diff options
author | rockot <rockot@chromium.org> | 2015-06-08 12:16:54 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-08 19:17:30 +0000 |
commit | 89b0cc457ff83154f80709d9b58575047845730e (patch) | |
tree | 7cbbc6300759a6134147c56c692be13321aa07ac /content/browser/mojo/mojo_app_connection_impl.cc | |
parent | 0848c19612d83b46e7339efff8da1c743fbbefa1 (diff) | |
download | chromium_src-89b0cc457ff83154f80709d9b58575047845730e.zip chromium_src-89b0cc457ff83154f80709d9b58575047845730e.tar.gz chromium_src-89b0cc457ff83154f80709d9b58575047845730e.tar.bz2 |
Add a mojo shell service to render frames
This adds a Shell service to each render frame's service
registry, allowing frames to connect to Mojo applications.
When connecting to an application, the frame identifies
itself using its SiteInstance's URL.
BUG=497474
Review URL: https://codereview.chromium.org/1164163002
Cr-Commit-Position: refs/heads/master@{#333312}
Diffstat (limited to 'content/browser/mojo/mojo_app_connection_impl.cc')
-rw-r--r-- | content/browser/mojo/mojo_app_connection_impl.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/content/browser/mojo/mojo_app_connection_impl.cc b/content/browser/mojo/mojo_app_connection_impl.cc index d643bbf..4f567d9 100644 --- a/content/browser/mojo/mojo_app_connection_impl.cc +++ b/content/browser/mojo/mojo_app_connection_impl.cc @@ -8,12 +8,20 @@ namespace content { -scoped_ptr<MojoAppConnection> MojoAppConnection::Create(const GURL& url) { - return scoped_ptr<MojoAppConnection>(new MojoAppConnectionImpl(url)); +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) { - MojoShellContext::ConnectToApplication(url, mojo::GetProxy(&services_)); +MojoAppConnectionImpl::MojoAppConnectionImpl(const GURL& url, + const GURL& requestor_url) { + MojoShellContext::ConnectToApplication(url, requestor_url, + mojo::GetProxy(&services_)); } MojoAppConnectionImpl::~MojoAppConnectionImpl() { |