Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / content / browser / mojo / mojo_app_connection_impl.cc
blob5d0e00534deb5643310063f0192d0994147ac249
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_),
25 mojo::ServiceProviderPtr(),
26 nullptr);
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