blob: 06d07c562e7b8017f4217f86a912f40340324120 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// 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 "content/browser/mojo/mojo_app_connection_impl.h"
#include "content/browser/mojo/mojo_shell_context.h"
#include "mojo/shell/capability_filter.h"
namespace content {
const char kBrowserMojoAppUrl[] = "system:content_browser";
// static
scoped_ptr<MojoAppConnection> MojoAppConnection::Create(
const GURL& url,
const GURL& requestor_url) {
return scoped_ptr<MojoAppConnection>(
new MojoAppConnectionImpl(url, requestor_url));
}
MojoAppConnectionImpl::MojoAppConnectionImpl(const GURL& url,
const GURL& requestor_url) {
MojoShellContext::ConnectToApplication(
url, requestor_url, mojo::GetProxy(&services_),
mojo::ServiceProviderPtr(), mojo::shell::GetPermissiveCapabilityFilter());
}
MojoAppConnectionImpl::~MojoAppConnectionImpl() {
}
void MojoAppConnectionImpl::ConnectToService(
const std::string& service_name,
mojo::ScopedMessagePipeHandle handle) {
services_->ConnectToService(service_name, handle.Pass());
}
} // namespace content
|