| 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 "base/files/scoped_file.h" | 8 #include "base/files/scoped_file.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 const std::string& activity, | 105 const std::string& activity, |
| 106 ScaleFactor scale_factor, | 106 ScaleFactor scale_factor, |
| 107 const std::vector<uint8_t>& icon_png_data) {} | 107 const std::vector<uint8_t>& icon_png_data) {} |
| 108 | 108 |
| 109 protected: | 109 protected: |
| 110 virtual ~AppObserver() {} | 110 virtual ~AppObserver() {} |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 virtual ~ArcBridgeService(); | 113 virtual ~ArcBridgeService(); |
| 114 | 114 |
| 115 // Creates instance of |ArcBridgeService| for normal use. | |
| 116 static scoped_ptr<ArcBridgeService> Create( | |
| 117 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner, | |
| 118 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner); | |
| 119 | |
| 120 // Gets the global instance of the ARC Bridge Service. This can only be | |
| 121 // called on the thread that this class was created on. | |
| 122 static ArcBridgeService* Get(); | |
| 123 | |
| 124 // Return true if ARC has been enabled through a commandline | 115 // Return true if ARC has been enabled through a commandline |
| 125 // switch. | 116 // switch. |
| 126 static bool GetEnabled(const base::CommandLine* command_line); | 117 static bool GetEnabled(const base::CommandLine* command_line); |
| 127 | 118 |
| 128 // DetectAvailability() should be called once D-Bus is available. It will | 119 // DetectAvailability() should be called once D-Bus is available. It will |
| 129 // call CheckArcAvailability() on the session_manager. This can only be | 120 // call CheckArcAvailability() on the session_manager. This can only be |
| 130 // called on the thread that this class was created on. | 121 // called on the thread that this class was created on. |
| 131 virtual void DetectAvailability() = 0; | 122 virtual void DetectAvailability() = 0; |
| 132 | 123 |
| 133 // HandleStartup() should be called upon profile startup. This will only | 124 // HandleStartup() should be called upon profile startup. This will only |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 | 209 |
| 219 // The current state of the bridge. | 210 // The current state of the bridge. |
| 220 ArcBridgeService::State state_; | 211 ArcBridgeService::State state_; |
| 221 | 212 |
| 222 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); | 213 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); |
| 223 }; | 214 }; |
| 224 | 215 |
| 225 } // namespace arc | 216 } // namespace arc |
| 226 | 217 |
| 227 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ | 218 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ |
| OLD | NEW |