Roll ANGLE e754fb8..6ffeb74
[chromium-blink-merge.git] / content / browser / mojo / mojo_app_connection_impl.cc
blob4f567d92c840dd2c4b9cbeb6cab151b0949cb986
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
3 // found in the LICENSE file.
5 #include "content/browser/mojo/mojo_app_connection_impl.h"
7 #include "content/browser/mojo/mojo_shell_context.h"
9 namespace content {
11 const char kBrowserMojoAppUrl[] = "system:content_browser";
13 // static
14 scoped_ptr<MojoAppConnection> MojoAppConnection::Create(
15 const GURL& url,
16 const GURL& requestor_url) {
17 return scoped_ptr<MojoAppConnection>(
18 new MojoAppConnectionImpl(url, requestor_url));
21 MojoAppConnectionImpl::MojoAppConnectionImpl(const GURL& url,
22 const GURL& requestor_url) {
23 MojoShellContext::ConnectToApplication(url, requestor_url,
24 mojo::GetProxy(&services_));
27 MojoAppConnectionImpl::~MojoAppConnectionImpl() {
30 void MojoAppConnectionImpl::ConnectToService(
31 const std::string& service_name,
32 mojo::ScopedMessagePipeHandle handle) {
33 services_->ConnectToService(service_name, handle.Pass());
36 } // namespace content