| 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 <iosfwd> | 8 #include <iosfwd> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 InstanceHolder<mojom::ObbMounterInstance>* obb_mounter() { | 115 InstanceHolder<mojom::ObbMounterInstance>* obb_mounter() { |
| 116 return &obb_mounter_; | 116 return &obb_mounter_; |
| 117 } | 117 } |
| 118 InstanceHolder<mojom::PolicyInstance>* policy() { return &policy_; } | 118 InstanceHolder<mojom::PolicyInstance>* policy() { return &policy_; } |
| 119 InstanceHolder<mojom::PowerInstance>* power() { return &power_; } | 119 InstanceHolder<mojom::PowerInstance>* power() { return &power_; } |
| 120 InstanceHolder<mojom::PrintInstance>* print() { return &print_; } | 120 InstanceHolder<mojom::PrintInstance>* print() { return &print_; } |
| 121 InstanceHolder<mojom::ProcessInstance>* process() { return &process_; } | 121 InstanceHolder<mojom::ProcessInstance>* process() { return &process_; } |
| 122 InstanceHolder<mojom::StorageManagerInstance>* storage_manager() { | 122 InstanceHolder<mojom::StorageManagerInstance>* storage_manager() { |
| 123 return &storage_manager_; | 123 return &storage_manager_; |
| 124 } | 124 } |
| 125 InstanceHolder<mojom::TraceInstance>* trace() { return &trace_; } |
| 125 InstanceHolder<mojom::TtsInstance>* tts() { return &tts_; } | 126 InstanceHolder<mojom::TtsInstance>* tts() { return &tts_; } |
| 126 InstanceHolder<mojom::VideoInstance>* video() { return &video_; } | 127 InstanceHolder<mojom::VideoInstance>* video() { return &video_; } |
| 127 InstanceHolder<mojom::WallpaperInstance>* wallpaper() { return &wallpaper_; } | 128 InstanceHolder<mojom::WallpaperInstance>* wallpaper() { return &wallpaper_; } |
| 128 | 129 |
| 129 // Gets if ARC is currently running. | 130 // Gets if ARC is currently running. |
| 130 bool ready() const { return state() == State::READY; } | 131 bool ready() const { return state() == State::READY; } |
| 131 | 132 |
| 132 // Gets if ARC is currently stopped. This is not exactly !ready() since there | 133 // Gets if ARC is currently stopped. This is not exactly !ready() since there |
| 133 // are transient states between ready() and stopped(). | 134 // are transient states between ready() and stopped(). |
| 134 bool stopped() const { return state() == State::STOPPED; } | 135 bool stopped() const { return state() == State::STOPPED; } |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 InstanceHolder<mojom::IntentHelperInstance> intent_helper_; | 186 InstanceHolder<mojom::IntentHelperInstance> intent_helper_; |
| 186 InstanceHolder<mojom::MetricsInstance> metrics_; | 187 InstanceHolder<mojom::MetricsInstance> metrics_; |
| 187 InstanceHolder<mojom::NetInstance> net_; | 188 InstanceHolder<mojom::NetInstance> net_; |
| 188 InstanceHolder<mojom::NotificationsInstance> notifications_; | 189 InstanceHolder<mojom::NotificationsInstance> notifications_; |
| 189 InstanceHolder<mojom::ObbMounterInstance> obb_mounter_; | 190 InstanceHolder<mojom::ObbMounterInstance> obb_mounter_; |
| 190 InstanceHolder<mojom::PolicyInstance> policy_; | 191 InstanceHolder<mojom::PolicyInstance> policy_; |
| 191 InstanceHolder<mojom::PowerInstance> power_; | 192 InstanceHolder<mojom::PowerInstance> power_; |
| 192 InstanceHolder<mojom::PrintInstance> print_; | 193 InstanceHolder<mojom::PrintInstance> print_; |
| 193 InstanceHolder<mojom::ProcessInstance> process_; | 194 InstanceHolder<mojom::ProcessInstance> process_; |
| 194 InstanceHolder<mojom::StorageManagerInstance> storage_manager_; | 195 InstanceHolder<mojom::StorageManagerInstance> storage_manager_; |
| 196 InstanceHolder<mojom::TraceInstance> trace_; |
| 195 InstanceHolder<mojom::TtsInstance> tts_; | 197 InstanceHolder<mojom::TtsInstance> tts_; |
| 196 InstanceHolder<mojom::VideoInstance> video_; | 198 InstanceHolder<mojom::VideoInstance> video_; |
| 197 InstanceHolder<mojom::WallpaperInstance> wallpaper_; | 199 InstanceHolder<mojom::WallpaperInstance> wallpaper_; |
| 198 | 200 |
| 199 // Gets the current state of the bridge service. | 201 // Gets the current state of the bridge service. |
| 200 State state() const { return state_; } | 202 State state() const { return state_; } |
| 201 | 203 |
| 202 // Changes the current state and notifies all observers. | 204 // Changes the current state and notifies all observers. |
| 203 void SetState(State state); | 205 void SetState(State state); |
| 204 | 206 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 235 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); | 237 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); |
| 236 }; | 238 }; |
| 237 | 239 |
| 238 // Defines "<<" operator for LOGging purpose. | 240 // Defines "<<" operator for LOGging purpose. |
| 239 std::ostream& operator<<( | 241 std::ostream& operator<<( |
| 240 std::ostream& os, ArcBridgeService::StopReason reason); | 242 std::ostream& os, ArcBridgeService::StopReason reason); |
| 241 | 243 |
| 242 } // namespace arc | 244 } // namespace arc |
| 243 | 245 |
| 244 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ | 246 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ |
| OLD | NEW |