Chromium Code Reviews| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 124 ~ArcBridgeService() override; | 124 ~ArcBridgeService() override; |
| 125 | 125 |
| 126 // Gets the global instance of the ARC Bridge Service. This can only be | 126 // Gets the global instance of the ARC Bridge Service. This can only be |
| 127 // called on the thread that this class was created on. | 127 // called on the thread that this class was created on. |
| 128 static ArcBridgeService* Get(); | 128 static ArcBridgeService* Get(); |
| 129 | 129 |
| 130 // Return true if ARC has been enabled through a commandline | 130 // Return true if ARC has been enabled through a commandline |
| 131 // switch. | 131 // switch. |
| 132 static bool GetEnabled(const base::CommandLine* command_line); | 132 static bool GetEnabled(const base::CommandLine* command_line); |
| 133 | 133 |
| 134 // DetectAvailability() should be called once D-Bus is available. It will | 134 // SetDetectionResult() should be called once CheckArcAvailability() on the |
| 135 // call CheckArcAvailability() on the session_manager. This can only be | 135 // session_manager is called. This can only be called on the thread that this |
| 136 // called on the thread that this class was created on. | 136 // class was created on. |
| 137 virtual void DetectAvailability() = 0; | 137 virtual void SetDetectionResult(bool availability) = 0; |
|
xiyuan
2016/02/26 17:38:01
nit: SetDetectionResult -> SetDetectedAvailability
arthurhsu
2016/02/26 19:10:06
Done
| |
| 138 | 138 |
| 139 // HandleStartup() should be called upon profile startup. This will only | 139 // HandleStartup() should be called upon profile startup. This will only |
| 140 // launch an instance if the instance service is available and it is enabled. | 140 // launch an instance if the instance service is available and it is enabled. |
| 141 // This can only be called on the thread that this class was created on. | 141 // This can only be called on the thread that this class was created on. |
| 142 virtual void HandleStartup() = 0; | 142 virtual void HandleStartup() = 0; |
| 143 | 143 |
| 144 // Shutdown() should be called when the browser is shutting down. This can | 144 // Shutdown() should be called when the browser is shutting down. This can |
| 145 // only be called on the thread that this class was created on. | 145 // only be called on the thread that this class was created on. |
| 146 virtual void Shutdown() = 0; | 146 virtual void Shutdown() = 0; |
| 147 | 147 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 295 | 295 |
| 296 // WeakPtrFactory to use callbacks. | 296 // WeakPtrFactory to use callbacks. |
| 297 base::WeakPtrFactory<ArcBridgeService> weak_factory_; | 297 base::WeakPtrFactory<ArcBridgeService> weak_factory_; |
| 298 | 298 |
| 299 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); | 299 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); |
| 300 }; | 300 }; |
| 301 | 301 |
| 302 } // namespace arc | 302 } // namespace arc |
| 303 | 303 |
| 304 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ | 304 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ |
| OLD | NEW |