| 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_SESSION_RUNNER_H_ | 5 #ifndef COMPONENTS_ARC_ARC_SESSION_RUNNER_H_ |
| 6 #define COMPONENTS_ARC_ARC_SESSION_RUNNER_H_ | 6 #define COMPONENTS_ARC_ARC_SESSION_RUNNER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 // Request to stop ARC instance is recieved. Stopping the ARC instance. | 93 // Request to stop ARC instance is recieved. Stopping the ARC instance. |
| 94 STOPPING, | 94 STOPPING, |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 // Starts to run an ARC instance. | 97 // Starts to run an ARC instance. |
| 98 void StartArcSession(); | 98 void StartArcSession(); |
| 99 | 99 |
| 100 // ArcSessionObserver: | 100 // ArcSessionObserver: |
| 101 void OnSessionReady() override; | 101 void OnSessionReady() override; |
| 102 void OnSessionStopped(StopReason reason) override; | 102 void OnSessionStopped(StopReason reason, bool restarting) override; |
| 103 | 103 |
| 104 base::ThreadChecker thread_checker_; | 104 base::ThreadChecker thread_checker_; |
| 105 | 105 |
| 106 // Observers for the ARC instance state change events. | 106 // Observers for the ARC instance state change events. |
| 107 base::ObserverList<ArcSessionObserver> observer_list_; | 107 base::ObserverList<ArcSessionObserver> observer_list_; |
| 108 | 108 |
| 109 // Whether a client requests to run session or not. | 109 // Whether a client requests to run session or not. |
| 110 bool run_requested_ = false; | 110 bool run_requested_ = false; |
| 111 | 111 |
| 112 // Instead of immediately trying to restart the container, give it some time | 112 // Instead of immediately trying to restart the container, give it some time |
| (...skipping 13 matching lines...) Expand all Loading... |
| 126 | 126 |
| 127 // WeakPtrFactory to use callbacks. | 127 // WeakPtrFactory to use callbacks. |
| 128 base::WeakPtrFactory<ArcSessionRunner> weak_ptr_factory_; | 128 base::WeakPtrFactory<ArcSessionRunner> weak_ptr_factory_; |
| 129 | 129 |
| 130 DISALLOW_COPY_AND_ASSIGN(ArcSessionRunner); | 130 DISALLOW_COPY_AND_ASSIGN(ArcSessionRunner); |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 } // namespace arc | 133 } // namespace arc |
| 134 | 134 |
| 135 #endif // COMPONENTS_ARC_ARC_SESSION_RUNNER_H_ | 135 #endif // COMPONENTS_ARC_ARC_SESSION_RUNNER_H_ |
| OLD | NEW |