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_instance.h" | 5 #include "components/arc/test/fake_arc_bridge_instance.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 namespace arc { | 9 namespace arc { |
10 | 10 |
11 FakeArcBridgeInstance::FakeArcBridgeInstance() : binding_(this) {} | 11 FakeArcBridgeInstance::FakeArcBridgeInstance() : binding_(this) {} |
12 FakeArcBridgeInstance::~FakeArcBridgeInstance() {} | 12 FakeArcBridgeInstance::~FakeArcBridgeInstance() {} |
13 | 13 |
14 void FakeArcBridgeInstance::Init(ArcBridgeHostPtr host) { | 14 void FakeArcBridgeInstance::Init(mojom::ArcBridgeHostPtr host) { |
15 host_ptr_ = std::move(host); | 15 host_ptr_ = std::move(host); |
16 init_calls_++; | 16 init_calls_++; |
17 } | 17 } |
18 | 18 |
19 void FakeArcBridgeInstance::Unbind() { | 19 void FakeArcBridgeInstance::Unbind() { |
20 host_ptr_.reset(); | 20 host_ptr_.reset(); |
21 if (binding_.is_bound()) | 21 if (binding_.is_bound()) |
22 binding_.Close(); | 22 binding_.Close(); |
23 } | 23 } |
24 | 24 |
25 void FakeArcBridgeInstance::Bind( | 25 void FakeArcBridgeInstance::Bind( |
26 mojo::InterfaceRequest<ArcBridgeInstance> interface_request) { | 26 mojo::InterfaceRequest<mojom::ArcBridgeInstance> interface_request) { |
27 binding_.Bind(std::move(interface_request)); | 27 binding_.Bind(std::move(interface_request)); |
28 } | 28 } |
29 | 29 |
30 void FakeArcBridgeInstance::WaitForInitCall() { | 30 void FakeArcBridgeInstance::WaitForInitCall() { |
31 binding_.WaitForIncomingMethodCall(); | 31 binding_.WaitForIncomingMethodCall(); |
32 } | 32 } |
33 | 33 |
34 } // namespace arc | 34 } // namespace arc |
OLD | NEW |