Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: content/browser/mojo/mojo_app_connection_impl.cc

Issue 1578473002: Pass application ids via AcceptConnection & ConnectToApplication callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/web_view/frame_utils.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/mojo/mojo_app_connection_impl.h" 5 #include "content/browser/mojo/mojo_app_connection_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "content/browser/mojo/mojo_shell_context.h" 11 #include "content/browser/mojo/mojo_shell_context.h"
12 #include "mojo/shell/capability_filter.h" 12 #include "mojo/shell/capability_filter.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 const char kBrowserMojoAppUrl[] = "system:content_browser"; 16 const char kBrowserMojoAppUrl[] = "system:content_browser";
17 17
18 namespace { 18 namespace {
19 void OnGotContentHandlerID(uint32_t content_handler_id) {} 19 void OnGotRemoteIDs(uint32_t remote_id, uint32_t content_handler_id) {}
20 } // namespace 20 } // namespace
21 21
22 // static 22 // static
23 scoped_ptr<MojoAppConnection> MojoAppConnection::Create( 23 scoped_ptr<MojoAppConnection> MojoAppConnection::Create(
24 const GURL& url, 24 const GURL& url,
25 const GURL& requestor_url) { 25 const GURL& requestor_url) {
26 return scoped_ptr<MojoAppConnection>( 26 return scoped_ptr<MojoAppConnection>(
27 new MojoAppConnectionImpl(url, requestor_url)); 27 new MojoAppConnectionImpl(url, requestor_url));
28 } 28 }
29 29
30 MojoAppConnectionImpl::MojoAppConnectionImpl(const GURL& url, 30 MojoAppConnectionImpl::MojoAppConnectionImpl(const GURL& url,
31 const GURL& requestor_url) { 31 const GURL& requestor_url) {
32 MojoShellContext::ConnectToApplication( 32 MojoShellContext::ConnectToApplication(
33 url, requestor_url, mojo::GetProxy(&services_), 33 url, requestor_url, mojo::GetProxy(&services_),
34 mojo::ServiceProviderPtr(), mojo::shell::GetPermissiveCapabilityFilter(), 34 mojo::ServiceProviderPtr(), mojo::shell::GetPermissiveCapabilityFilter(),
35 base::Bind(&OnGotContentHandlerID)); 35 base::Bind(&OnGotRemoteIDs));
36 } 36 }
37 37
38 MojoAppConnectionImpl::~MojoAppConnectionImpl() { 38 MojoAppConnectionImpl::~MojoAppConnectionImpl() {
39 } 39 }
40 40
41 void MojoAppConnectionImpl::ConnectToService( 41 void MojoAppConnectionImpl::ConnectToService(
42 const std::string& service_name, 42 const std::string& service_name,
43 mojo::ScopedMessagePipeHandle handle) { 43 mojo::ScopedMessagePipeHandle handle) {
44 services_->ConnectToService(service_name, std::move(handle)); 44 services_->ConnectToService(service_name, std::move(handle));
45 } 45 }
46 46
47 } // namespace content 47 } // namespace content
OLDNEW
« no previous file with comments | « components/web_view/frame_utils.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698