| 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 #include "components/arc/arc_bridge_service.h" | 5 #include "components/arc/arc_bridge_service.h" |
| 6 | 6 |
| 7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "chromeos/dbus/dbus_thread_manager.h" | 9 #include "chromeos/dbus/dbus_thread_manager.h" |
| 10 #include "components/arc/common/arc_host_messages.h" | 10 #include "components/arc/common/arc_host_messages.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 case ArcBridgeService::State::STOPPED: | 62 case ArcBridgeService::State::STOPPED: |
| 63 message_loop_.PostTask(FROM_HERE, message_loop_.QuitWhenIdleClosure()); | 63 message_loop_.PostTask(FROM_HERE, message_loop_.QuitWhenIdleClosure()); |
| 64 break; | 64 break; |
| 65 | 65 |
| 66 default: | 66 default: |
| 67 break; | 67 break; |
| 68 } | 68 } |
| 69 } | 69 } |
| 70 | 70 |
| 71 void OnInstanceBootPhase(InstanceBootPhase boot_phase) { | 71 void OnInstanceBootPhase(InstanceBootPhase boot_phase) override { |
| 72 boot_phase_ = boot_phase; | 72 boot_phase_ = boot_phase; |
| 73 } | 73 } |
| 74 | 74 |
| 75 bool ready() const { return ready_; } | 75 bool ready() const { return ready_; } |
| 76 InstanceBootPhase boot_phase() const { return boot_phase_; } | 76 InstanceBootPhase boot_phase() const { return boot_phase_; } |
| 77 ArcBridgeService::State state() const { return state_; } | 77 ArcBridgeService::State state() const { return state_; } |
| 78 | 78 |
| 79 protected: | 79 protected: |
| 80 scoped_ptr<IPCSenderFake> fake_sender_; | 80 scoped_ptr<IPCSenderFake> fake_sender_; |
| 81 | 81 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 ASSERT_TRUE(state() == ArcBridgeService::State::STOPPING || | 185 ASSERT_TRUE(state() == ArcBridgeService::State::STOPPING || |
| 186 state() == ArcBridgeService::State::STOPPED); | 186 state() == ArcBridgeService::State::STOPPED); |
| 187 | 187 |
| 188 base::RunLoop run_loop; | 188 base::RunLoop run_loop; |
| 189 run_loop.Run(); | 189 run_loop.Run(); |
| 190 | 190 |
| 191 ASSERT_EQ(ArcBridgeService::State::STOPPED, state()); | 191 ASSERT_EQ(ArcBridgeService::State::STOPPED, state()); |
| 192 } | 192 } |
| 193 | 193 |
| 194 } // namespace arc | 194 } // namespace arc |
| OLD | NEW |