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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 READY, | 60 READY, |
61 | 61 |
62 // The ARC instance has started shutting down. | 62 // The ARC instance has started shutting down. |
63 STOPPING, | 63 STOPPING, |
64 }; | 64 }; |
65 | 65 |
66 // Notifies life cycle events of ArcBridgeService. | 66 // Notifies life cycle events of ArcBridgeService. |
67 class Observer { | 67 class Observer { |
68 public: | 68 public: |
69 // Called whenever the state of the bridge has changed. | 69 // Called whenever the state of the bridge has changed. |
| 70 // TODO(lchavez): Rename to OnStateChangedForTest |
70 virtual void OnStateChanged(State state) {} | 71 virtual void OnStateChanged(State state) {} |
| 72 virtual void OnBridgeReady() {} |
| 73 virtual void OnBridgeStopped() {} |
71 | 74 |
72 // Called whenever ARC's availability has changed for this system. | 75 // Called whenever ARC's availability has changed for this system. |
73 virtual void OnAvailableChanged(bool available) {} | 76 virtual void OnAvailableChanged(bool available) {} |
74 | 77 |
75 // Called whenever the ARC app interface state changes. | 78 // Called whenever the ARC app interface state changes. |
76 virtual void OnAppInstanceReady() {} | 79 virtual void OnAppInstanceReady() {} |
77 virtual void OnAppInstanceClosed() {} | 80 virtual void OnAppInstanceClosed() {} |
78 | 81 |
79 // Called whenever the ARC audio interface state changes. | 82 // Called whenever the ARC audio interface state changes. |
80 virtual void OnAudioInstanceReady() {} | 83 virtual void OnAudioInstanceReady() {} |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 | 413 |
411 // WeakPtrFactory to use callbacks. | 414 // WeakPtrFactory to use callbacks. |
412 base::WeakPtrFactory<ArcBridgeService> weak_factory_; | 415 base::WeakPtrFactory<ArcBridgeService> weak_factory_; |
413 | 416 |
414 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); | 417 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); |
415 }; | 418 }; |
416 | 419 |
417 } // namespace arc | 420 } // namespace arc |
418 | 421 |
419 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ | 422 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ |
OLD | NEW |