| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ | 5 #ifndef COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ |
| 6 #define COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ | 6 #define COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // Describes the reason the bridge is stopped. | 32 // Describes the reason the bridge is stopped. |
| 33 enum class StopReason { | 33 enum class StopReason { |
| 34 // ARC instance has been gracefully shut down. | 34 // ARC instance has been gracefully shut down. |
| 35 SHUTDOWN, | 35 SHUTDOWN, |
| 36 | 36 |
| 37 // Errors occurred during the ARC instance boot. This includes any failures | 37 // Errors occurred during the ARC instance boot. This includes any failures |
| 38 // before the instance is actually attempted to be started, and also | 38 // before the instance is actually attempted to be started, and also |
| 39 // failures on bootstrapping IPC channels with Android. | 39 // failures on bootstrapping IPC channels with Android. |
| 40 GENERIC_BOOT_FAILURE, | 40 GENERIC_BOOT_FAILURE, |
| 41 | 41 |
| 42 // The device is critically low on disk space. |
| 43 LOW_DISK_SPACE, |
| 44 |
| 42 // ARC instance has crashed. | 45 // ARC instance has crashed. |
| 43 CRASH, | 46 CRASH, |
| 44 }; | 47 }; |
| 45 | 48 |
| 46 // Notifies life cycle events of ArcBridgeService. | 49 // Notifies life cycle events of ArcBridgeService. |
| 47 class Observer { | 50 class Observer { |
| 48 public: | 51 public: |
| 49 // Called whenever the state of the bridge has changed. | 52 // Called whenever the state of the bridge has changed. |
| 50 virtual void OnBridgeReady() {} | 53 virtual void OnBridgeReady() {} |
| 51 virtual void OnBridgeStopped(StopReason reason) {} | 54 virtual void OnBridgeStopped(StopReason reason) {} |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 | 267 |
| 265 // WeakPtrFactory to use callbacks. | 268 // WeakPtrFactory to use callbacks. |
| 266 base::WeakPtrFactory<ArcBridgeService> weak_factory_; | 269 base::WeakPtrFactory<ArcBridgeService> weak_factory_; |
| 267 | 270 |
| 268 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); | 271 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); |
| 269 }; | 272 }; |
| 270 | 273 |
| 271 } // namespace arc | 274 } // namespace arc |
| 272 | 275 |
| 273 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ | 276 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ |
| OLD | NEW |