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

Unified Diff: components/proxy_resolver/proxy_resolver_app.cc

Issue 1128453004: Embed a simple Mojo shell in content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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: components/proxy_resolver/proxy_resolver_app.cc
diff --git a/components/proxy_resolver/proxy_resolver_app.cc b/components/proxy_resolver/proxy_resolver_app.cc
new file mode 100644
index 0000000000000000000000000000000000000000..44a3b2597df16676ef4e40ad2f0562ade98259d0
--- /dev/null
+++ b/components/proxy_resolver/proxy_resolver_app.cc
@@ -0,0 +1,31 @@
+// 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 "components/proxy_resolver/proxy_resolver_app.h"
+
+#include "net/proxy/mojo_proxy_resolver_factory_impl.h"
+#include "third_party/mojo/src/mojo/public/cpp/application/application_connection.h"
+
+namespace proxy_resolver {
+
+ProxyResolverApp::ProxyResolverApp() {
+}
+
+ProxyResolverApp::~ProxyResolverApp() {
+}
+
+bool ProxyResolverApp::ConfigureIncomingConnection(
+ mojo::ApplicationConnection* connection) {
+ connection->AddService(this);
+ return true;
+}
+
+void ProxyResolverApp::Create(
+ mojo::ApplicationConnection* connection,
+ mojo::InterfaceRequest<net::interfaces::ProxyResolverFactory> request) {
+ // The lifetime of this instance is bound to that of the message pipe.
+ new net::MojoProxyResolverFactoryImpl(request.Pass());
+}
+
+} // namespace proxy_resolver

Powered by Google App Engine
This is Rietveld 408576698