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

Side by Side Diff: content/browser/frame_host/frame_mojo_shell.cc

Issue 1719193003: Add a user id parameter to connections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 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
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/frame_host/frame_mojo_shell.h" 5 #include "content/browser/frame_host/frame_mojo_shell.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/browser/mojo/mojo_shell_context.h" 10 #include "content/browser/mojo/mojo_shell_context.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 void FrameMojoShell::BindRequest( 43 void FrameMojoShell::BindRequest(
44 mojo::InterfaceRequest<mojo::shell::mojom::Shell> shell_request) { 44 mojo::InterfaceRequest<mojo::shell::mojom::Shell> shell_request) {
45 bindings_.AddBinding(this, std::move(shell_request)); 45 bindings_.AddBinding(this, std::move(shell_request));
46 } 46 }
47 47
48 // TODO(xhwang): Currently no callers are exposing |exposed_services|. So we 48 // TODO(xhwang): Currently no callers are exposing |exposed_services|. So we
49 // drop it and replace it with services we provide in the browser. In the 49 // drop it and replace it with services we provide in the browser. In the
50 // future we may need to support both. 50 // future we may need to support both.
51 void FrameMojoShell::Connect( 51 void FrameMojoShell::Connect(
52 const mojo::String& application_url, 52 const mojo::String& application_url,
53 uint32_t user_id,
53 mojo::shell::mojom::InterfaceProviderRequest services, 54 mojo::shell::mojom::InterfaceProviderRequest services,
54 mojo::shell::mojom::InterfaceProviderPtr /* exposed_services */, 55 mojo::shell::mojom::InterfaceProviderPtr /* exposed_services */,
55 mojo::shell::mojom::CapabilityFilterPtr filter, 56 mojo::shell::mojom::CapabilityFilterPtr filter,
56 const ConnectCallback& callback) { 57 const ConnectCallback& callback) {
58 // TODO(beng): user_id is dropped on the floor right now. Figure out what to
59 // do with it.
57 mojo::shell::mojom::InterfaceProviderPtr frame_services; 60 mojo::shell::mojom::InterfaceProviderPtr frame_services;
58 service_provider_bindings_.AddBinding(GetServiceRegistry(), 61 service_provider_bindings_.AddBinding(GetServiceRegistry(),
59 GetProxy(&frame_services)); 62 GetProxy(&frame_services));
60 63
61 mojo::shell::CapabilityFilter capability_filter = 64 mojo::shell::CapabilityFilter capability_filter =
62 mojo::shell::GetPermissiveCapabilityFilter(); 65 mojo::shell::GetPermissiveCapabilityFilter();
63 if (!filter.is_null()) 66 if (!filter.is_null())
64 capability_filter = filter->filter.To<mojo::shell::CapabilityFilter>(); 67 capability_filter = filter->filter.To<mojo::shell::CapabilityFilter>();
65 MojoShellContext::ConnectToApplication( 68 MojoShellContext::ConnectToApplication(
66 application_url.To<GURL>(), 69 application_url.To<GURL>(),
(...skipping 13 matching lines...) Expand all
80 // different services for different apps for better isolation. 83 // different services for different apps for better isolation.
81 RegisterFrameMojoShellServices(service_registry_.get(), frame_host_); 84 RegisterFrameMojoShellServices(service_registry_.get(), frame_host_);
82 GetContentClient()->browser()->RegisterFrameMojoShellServices( 85 GetContentClient()->browser()->RegisterFrameMojoShellServices(
83 service_registry_.get(), frame_host_); 86 service_registry_.get(), frame_host_);
84 } 87 }
85 88
86 return service_registry_.get(); 89 return service_registry_.get();
87 } 90 }
88 91
89 } // namespace content 92 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_mojo_shell.h ('k') | content/browser/mojo/mojo_shell_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698