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

Unified Diff: content/browser/mojo/mojo_app_connection_impl.cc

Issue 1149833007: Embed a mojo ApplicationManager in content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
Index: content/browser/mojo/mojo_app_connection_impl.cc
diff --git a/content/browser/mojo/mojo_app_connection_impl.cc b/content/browser/mojo/mojo_app_connection_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d643bbfb108a0ea23a72e9c09dfa3a7efb0e0d40
--- /dev/null
+++ b/content/browser/mojo/mojo_app_connection_impl.cc
@@ -0,0 +1,28 @@
+// Copyright 2015 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 "content/browser/mojo/mojo_app_connection_impl.h"
+
+#include "content/browser/mojo/mojo_shell_context.h"
+
+namespace content {
+
+scoped_ptr<MojoAppConnection> MojoAppConnection::Create(const GURL& url) {
+ return scoped_ptr<MojoAppConnection>(new MojoAppConnectionImpl(url));
+}
+
+MojoAppConnectionImpl::MojoAppConnectionImpl(const GURL& url) {
+ MojoShellContext::ConnectToApplication(url, mojo::GetProxy(&services_));
+}
+
+MojoAppConnectionImpl::~MojoAppConnectionImpl() {
+}
+
+void MojoAppConnectionImpl::ConnectToService(
+ const std::string& service_name,
+ mojo::ScopedMessagePipeHandle handle) {
+ services_->ConnectToService(service_name, handle.Pass());
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698