OLD | NEW |
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_shell_context.h" | 5 #include "content/browser/mojo/mojo_shell_context.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 std::move(exposed_services), callback); | 277 std::move(exposed_services), callback); |
278 } | 278 } |
279 | 279 |
280 void MojoShellContext::ConnectToApplicationOnOwnThread( | 280 void MojoShellContext::ConnectToApplicationOnOwnThread( |
281 const std::string& name, | 281 const std::string& name, |
282 const std::string& requestor_name, | 282 const std::string& requestor_name, |
283 mojo::shell::mojom::InterfaceProviderRequest request, | 283 mojo::shell::mojom::InterfaceProviderRequest request, |
284 mojo::shell::mojom::InterfaceProviderPtr exposed_services, | 284 mojo::shell::mojom::InterfaceProviderPtr exposed_services, |
285 const mojo::shell::mojom::Connector::ConnectCallback& callback) { | 285 const mojo::shell::mojom::Connector::ConnectCallback& callback) { |
286 scoped_ptr<mojo::shell::ConnectParams> params(new mojo::shell::ConnectParams); | 286 scoped_ptr<mojo::shell::ConnectParams> params(new mojo::shell::ConnectParams); |
287 // TODO(beng): kUserRoot is obviously wrong. | 287 // TODO(beng): kRootUserID is obviously wrong. |
288 // TODO(beng): We need to set a permissive filter here temporarily because | 288 // TODO(beng): We need to set a permissive filter here temporarily because |
289 // content is known as a bogus system: name that the application | 289 // content is known as a bogus system: name that the application |
290 // manager doesn't understand. | 290 // manager doesn't understand. |
291 mojo::shell::Identity source_id( | 291 mojo::shell::Identity source_id( |
292 requestor_name, std::string(), mojo::shell::mojom::Connector::kUserRoot); | 292 requestor_name, std::string(), mojo::shell::mojom::kRootUserID); |
293 source_id.set_filter(mojo::shell::GetPermissiveCapabilityFilter()); | 293 source_id.set_filter(mojo::shell::GetPermissiveCapabilityFilter()); |
294 params->set_source(source_id); | 294 params->set_source(source_id); |
295 params->set_target(mojo::shell::Identity( | 295 params->set_target(mojo::shell::Identity( |
296 name, std::string(), mojo::shell::mojom::Connector::kUserRoot)); | 296 name, std::string(), mojo::shell::mojom::kRootUserID)); |
297 params->set_remote_interfaces(std::move(request)); | 297 params->set_remote_interfaces(std::move(request)); |
298 params->set_local_interfaces(std::move(exposed_services)); | 298 params->set_local_interfaces(std::move(exposed_services)); |
299 params->set_connect_callback(callback); | 299 params->set_connect_callback(callback); |
300 shell_->Connect(std::move(params)); | 300 shell_->Connect(std::move(params)); |
301 } | 301 } |
302 | 302 |
303 } // namespace content | 303 } // namespace content |
OLD | NEW |