| 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/test/fake_arc_bridge_service.h" | 5 #include "components/arc/test/fake_arc_bridge_service.h" |
| 6 | 6 |
| 7 namespace arc { | 7 namespace arc { |
| 8 | 8 |
| 9 FakeArcBridgeService::FakeArcBridgeService() = default; | 9 FakeArcBridgeService::FakeArcBridgeService() = default; |
| 10 | 10 |
| 11 FakeArcBridgeService::~FakeArcBridgeService() { | 11 FakeArcBridgeService::~FakeArcBridgeService() { |
| 12 SetStopped(); | 12 SetStopped(); |
| 13 } | 13 } |
| 14 | 14 |
| 15 void FakeArcBridgeService::RequestStart() { | 15 void FakeArcBridgeService::RequestStart() { |
| 16 SetReady(); | 16 SetReady(); |
| 17 } | 17 } |
| 18 | 18 |
| 19 void FakeArcBridgeService::RequestStop() { | 19 void FakeArcBridgeService::RequestStop() { |
| 20 SetStopped(); | 20 SetStopped(); |
| 21 } | 21 } |
| 22 | 22 |
| 23 void FakeArcBridgeService::OnShutdown() { | 23 void FakeArcBridgeService::OnShutdown() { |
| 24 SetStopped(); | 24 SetStopped(); |
| 25 } | 25 } |
| 26 | 26 |
| 27 void FakeArcBridgeService::SetReady() { | 27 void FakeArcBridgeService::SetReady() { |
| 28 if (state() != State::READY) | 28 if (state() != State::RUNNING) |
| 29 SetState(State::READY); | 29 SetState(State::RUNNING); |
| 30 } | 30 } |
| 31 | 31 |
| 32 void FakeArcBridgeService::SetStopped() { | 32 void FakeArcBridgeService::SetStopped() { |
| 33 if (state() != State::STOPPED) | 33 if (state() != State::STOPPED) |
| 34 SetState(State::STOPPED); | 34 SetState(State::STOPPED); |
| 35 } | 35 } |
| 36 | 36 |
| 37 } // namespace arc | 37 } // namespace arc |
| OLD | NEW |