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"
11 const char kBrowserMojoAppUrl
[] = "system:content_browser";
14 scoped_ptr
<MojoAppConnection
> MojoAppConnection::Create(
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