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