Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Side by Side Diff: components/arc/arc_bridge_service.h

Issue 2558313002: Remove explicit singletonness of ArcBridgeService part 5. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <iosfwd> 8 #include <iosfwd>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // Called whenever the state of the bridge has changed. 83 // Called whenever the state of the bridge has changed.
84 virtual void OnBridgeReady() {} 84 virtual void OnBridgeReady() {}
85 virtual void OnBridgeStopped(StopReason reason) {} 85 virtual void OnBridgeStopped(StopReason reason) {}
86 86
87 protected: 87 protected:
88 virtual ~Observer() {} 88 virtual ~Observer() {}
89 }; 89 };
90 90
91 virtual ~ArcBridgeService(); 91 virtual ~ArcBridgeService();
92 92
93 // Gets the global instance of the ARC Bridge Service. This can only be
94 // called on the thread that this class was created on.
95 static ArcBridgeService* Get();
Luis Héctor Chávez 2016/12/08 17:38:25 \o/
96
97 // Return true if ARC has been enabled through a commandline 93 // Return true if ARC has been enabled through a commandline
98 // switch. 94 // switch.
99 static bool GetEnabled(const base::CommandLine* command_line); 95 static bool GetEnabled(const base::CommandLine* command_line);
100 96
101 // Return true if ARC is available on the current board. 97 // Return true if ARC is available on the current board.
102 static bool GetAvailable(const base::CommandLine* command_line); 98 static bool GetAvailable(const base::CommandLine* command_line);
103 99
104 // HandleStartup() should be called upon profile startup. This will only 100 // HandleStartup() should be called upon profile startup. This will only
105 // launch an instance if the instance is enabled. 101 // launch an instance if the instance is enabled.
106 // This can only be called on the thread that this class was created on. 102 // This can only be called on the thread that this class was created on.
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); 271 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService);
276 }; 272 };
277 273
278 // Defines "<<" operator for LOGging purpose. 274 // Defines "<<" operator for LOGging purpose.
279 std::ostream& operator<<( 275 std::ostream& operator<<(
280 std::ostream& os, ArcBridgeService::StopReason reason); 276 std::ostream& os, ArcBridgeService::StopReason reason);
281 277
282 } // namespace arc 278 } // namespace arc
283 279
284 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ 280 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | components/arc/arc_bridge_service.cc » ('j') | components/arc/arc_bridge_service_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698