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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 } | 112 } |
113 InstanceHolder<mojom::ObbMounterInstance>* obb_mounter() { | 113 InstanceHolder<mojom::ObbMounterInstance>* obb_mounter() { |
114 return &obb_mounter_; | 114 return &obb_mounter_; |
115 } | 115 } |
116 InstanceHolder<mojom::PolicyInstance>* policy() { return &policy_; } | 116 InstanceHolder<mojom::PolicyInstance>* policy() { return &policy_; } |
117 InstanceHolder<mojom::PowerInstance>* power() { return &power_; } | 117 InstanceHolder<mojom::PowerInstance>* power() { return &power_; } |
118 InstanceHolder<mojom::ProcessInstance>* process() { return &process_; } | 118 InstanceHolder<mojom::ProcessInstance>* process() { return &process_; } |
119 InstanceHolder<mojom::StorageManagerInstance>* storage_manager() { | 119 InstanceHolder<mojom::StorageManagerInstance>* storage_manager() { |
120 return &storage_manager_; | 120 return &storage_manager_; |
121 } | 121 } |
| 122 InstanceHolder<mojom::UserDataInstance>* user_data() { return &user_data_; } |
122 InstanceHolder<mojom::VideoInstance>* video() { return &video_; } | 123 InstanceHolder<mojom::VideoInstance>* video() { return &video_; } |
123 InstanceHolder<mojom::WindowManagerInstance>* window_manager() { | 124 InstanceHolder<mojom::WindowManagerInstance>* window_manager() { |
124 return &window_manager_; | 125 return &window_manager_; |
125 } | 126 } |
126 | 127 |
127 // Gets if ARC is available in this system. | 128 // Gets if ARC is available in this system. |
128 bool available() const { return available_; } | 129 bool available() const { return available_; } |
129 | 130 |
130 // Gets if ARC is currently running. | 131 // Gets if ARC is currently running. |
131 bool ready() const { return state() == State::READY; } | 132 bool ready() const { return state() == State::READY; } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 InstanceHolder<mojom::ImeInstance> ime_; | 184 InstanceHolder<mojom::ImeInstance> ime_; |
184 InstanceHolder<mojom::IntentHelperInstance> intent_helper_; | 185 InstanceHolder<mojom::IntentHelperInstance> intent_helper_; |
185 InstanceHolder<mojom::MetricsInstance> metrics_; | 186 InstanceHolder<mojom::MetricsInstance> metrics_; |
186 InstanceHolder<mojom::NetInstance> net_; | 187 InstanceHolder<mojom::NetInstance> net_; |
187 InstanceHolder<mojom::NotificationsInstance> notifications_; | 188 InstanceHolder<mojom::NotificationsInstance> notifications_; |
188 InstanceHolder<mojom::ObbMounterInstance> obb_mounter_; | 189 InstanceHolder<mojom::ObbMounterInstance> obb_mounter_; |
189 InstanceHolder<mojom::PolicyInstance> policy_; | 190 InstanceHolder<mojom::PolicyInstance> policy_; |
190 InstanceHolder<mojom::PowerInstance> power_; | 191 InstanceHolder<mojom::PowerInstance> power_; |
191 InstanceHolder<mojom::ProcessInstance> process_; | 192 InstanceHolder<mojom::ProcessInstance> process_; |
192 InstanceHolder<mojom::StorageManagerInstance> storage_manager_; | 193 InstanceHolder<mojom::StorageManagerInstance> storage_manager_; |
| 194 InstanceHolder<mojom::UserDataInstance> user_data_; |
193 InstanceHolder<mojom::VideoInstance> video_; | 195 InstanceHolder<mojom::VideoInstance> video_; |
194 InstanceHolder<mojom::WindowManagerInstance> window_manager_; | 196 InstanceHolder<mojom::WindowManagerInstance> window_manager_; |
195 | 197 |
196 // Gets the current state of the bridge service. | 198 // Gets the current state of the bridge service. |
197 State state() const { return state_; } | 199 State state() const { return state_; } |
198 | 200 |
199 // Changes the current state and notifies all observers. | 201 // Changes the current state and notifies all observers. |
200 void SetState(State state); | 202 void SetState(State state); |
201 | 203 |
202 // Changes the current availability and notifies all observers. | 204 // Changes the current availability and notifies all observers. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 236 |
235 // WeakPtrFactory to use callbacks. | 237 // WeakPtrFactory to use callbacks. |
236 base::WeakPtrFactory<ArcBridgeService> weak_factory_; | 238 base::WeakPtrFactory<ArcBridgeService> weak_factory_; |
237 | 239 |
238 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); | 240 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); |
239 }; | 241 }; |
240 | 242 |
241 } // namespace arc | 243 } // namespace arc |
242 | 244 |
243 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ | 245 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ |
OLD | NEW |