Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: components/arc/test/fake_arc_bridge_instance.cc

Issue 1548833002: arc-bridge: Restart ARC instance on crash (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Addressed more feedback Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/arc/test/fake_arc_bridge_instance.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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(ArcBridgeHostPtr host) {
15 host_ptr_ = std::move(host); 15 host_ptr_ = std::move(host);
16 init_calls_++;
17 }
18
19 void FakeArcBridgeInstance::Unbind() {
20 host_ptr_.reset();
21 if (binding_.is_bound())
22 binding_.Close();
16 } 23 }
17 24
18 void FakeArcBridgeInstance::Bind( 25 void FakeArcBridgeInstance::Bind(
19 mojo::InterfaceRequest<ArcBridgeInstance> interface_request) { 26 mojo::InterfaceRequest<ArcBridgeInstance> interface_request) {
20 binding_.Bind(std::move(interface_request)); 27 binding_.Bind(std::move(interface_request));
21 } 28 }
22 29
30 void FakeArcBridgeInstance::WaitForInitCall() {
31 binding_.WaitForIncomingMethodCall();
32 }
33
23 } // namespace arc 34 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/test/fake_arc_bridge_instance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698