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

Unified Diff: components/arc/test/fake_arc_bridge_bootstrap.cc

Issue 1829703002: Add ArcEnabled policy implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comments. Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/arc/test/fake_arc_bridge_bootstrap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/test/fake_arc_bridge_bootstrap.cc
diff --git a/components/arc/test/fake_arc_bridge_bootstrap.cc b/components/arc/test/fake_arc_bridge_bootstrap.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d2d80bda6b71c29b6111567046741e400433124b
--- /dev/null
+++ b/components/arc/test/fake_arc_bridge_bootstrap.cc
@@ -0,0 +1,33 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/arc/test/fake_arc_bridge_bootstrap.h"
+
+#include <utility>
+
+#include "base/logging.h"
+#include "components/arc/common/arc_bridge.mojom.h"
+#include "components/arc/test/fake_arc_bridge_instance.h"
+#include "mojo/public/cpp/bindings/interface_request.h"
+
+namespace arc {
+
+FakeArcBridgeBootstrap::FakeArcBridgeBootstrap(FakeArcBridgeInstance* instance)
+ : instance_(instance) {
+}
+
+void FakeArcBridgeBootstrap::Start() {
+ DCHECK(delegate_);
+ ArcBridgeInstancePtr instance;
+ instance_->Bind(mojo::GetProxy(&instance));
+ delegate_->OnConnectionEstablished(std::move(instance));
+}
+
+void FakeArcBridgeBootstrap::Stop() {
+ DCHECK(delegate_);
+ instance_->Unbind();
+ delegate_->OnStopped();
+}
+
+} // namespace arc
« no previous file with comments | « components/arc/test/fake_arc_bridge_bootstrap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698