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_
),
25 mojo::ServiceProviderPtr(),
29 MojoAppConnectionImpl::~MojoAppConnectionImpl() {
32 void MojoAppConnectionImpl::ConnectToService(
33 const std::string
& service_name
,
34 mojo::ScopedMessagePipeHandle handle
) {
35 services_
->ConnectToService(service_name
, handle
.Pass());
38 } // namespace content