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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 InstanceHolder<mojom::WallpaperInstance>* wallpaper() { return &wallpaper_; } | 129 InstanceHolder<mojom::WallpaperInstance>* wallpaper() { return &wallpaper_; } |
130 | 130 |
131 // Gets if ARC is currently running. | 131 // Gets if ARC is currently running. |
132 bool ready() const { return state() == State::RUNNING; } | 132 bool ready() const { return state() == State::RUNNING; } |
133 | 133 |
134 // Gets if ARC is currently stopped. This is not exactly !ready() since there | 134 // Gets if ARC is currently stopped. This is not exactly !ready() since there |
135 // are transient states between ready() and stopped(). | 135 // are transient states between ready() and stopped(). |
136 bool stopped() const { return state() == State::STOPPED; } | 136 bool stopped() const { return state() == State::STOPPED; } |
137 | 137 |
138 protected: | 138 protected: |
| 139 // TODO(hidehiko): Move ArcSessionRunner related part into ArcSessionRunner |
| 140 // when we get rid of inheritance. |
139 // The possible states of the bridge. In the normal flow, the state changes | 141 // The possible states of the bridge. In the normal flow, the state changes |
140 // in the following sequence: | 142 // in the following sequence: |
141 // | 143 // |
142 // STOPPED | 144 // STOPPED |
143 // RequestStart() -> | 145 // RequestStart() -> |
144 // STARTING | 146 // STARTING |
145 // OnSessionReady() -> | 147 // OnSessionReady() -> |
146 // READY | 148 // READY |
147 // | 149 // |
148 // The ArcSession state machine can be thought of being substates of | 150 // The ArcSession state machine can be thought of being substates of |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 227 |
226 // WeakPtrFactory to use callbacks. | 228 // WeakPtrFactory to use callbacks. |
227 base::WeakPtrFactory<ArcBridgeService> weak_factory_; | 229 base::WeakPtrFactory<ArcBridgeService> weak_factory_; |
228 | 230 |
229 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); | 231 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); |
230 }; | 232 }; |
231 | 233 |
232 } // namespace arc | 234 } // namespace arc |
233 | 235 |
234 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ | 236 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ |
OLD | NEW |