| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // Called whenever the ARC process is ready. | 88 // Called whenever the ARC process is ready. |
| 89 virtual void OnProcessInstanceReady() {} | 89 virtual void OnProcessInstanceReady() {} |
| 90 | 90 |
| 91 // Called whenever the ARC settings is ready. | 91 // Called whenever the ARC settings is ready. |
| 92 virtual void OnSettingsInstanceReady() {} | 92 virtual void OnSettingsInstanceReady() {} |
| 93 | 93 |
| 94 protected: | 94 protected: |
| 95 virtual ~Observer() {} | 95 virtual ~Observer() {} |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 // Notifies power management-related events. | |
| 99 class PowerObserver { | |
| 100 public: | |
| 101 // Called whenever ARC requests a wake lock. | |
| 102 virtual void OnAcquireDisplayWakeLock(DisplayWakeLockType type) {} | |
| 103 | |
| 104 // Called whenever ARC releases a wake lock. | |
| 105 virtual void OnReleaseDisplayWakeLock(DisplayWakeLockType type) {} | |
| 106 | |
| 107 protected: | |
| 108 virtual ~PowerObserver() {} | |
| 109 }; | |
| 110 | |
| 111 ~ArcBridgeService() override; | 98 ~ArcBridgeService() override; |
| 112 | 99 |
| 113 // Gets the global instance of the ARC Bridge Service. This can only be | 100 // Gets the global instance of the ARC Bridge Service. This can only be |
| 114 // called on the thread that this class was created on. | 101 // called on the thread that this class was created on. |
| 115 static ArcBridgeService* Get(); | 102 static ArcBridgeService* Get(); |
| 116 | 103 |
| 117 // Return true if ARC has been enabled through a commandline | 104 // Return true if ARC has been enabled through a commandline |
| 118 // switch. | 105 // switch. |
| 119 static bool GetEnabled(const base::CommandLine* command_line); | 106 static bool GetEnabled(const base::CommandLine* command_line); |
| 120 | 107 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 188 |
| 202 // The current state of the bridge. | 189 // The current state of the bridge. |
| 203 ArcBridgeService::State state_; | 190 ArcBridgeService::State state_; |
| 204 | 191 |
| 205 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); | 192 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); |
| 206 }; | 193 }; |
| 207 | 194 |
| 208 } // namespace arc | 195 } // namespace arc |
| 209 | 196 |
| 210 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ | 197 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ |
| OLD | NEW |