| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "mojo/shell/standalone/context.h" | 5 #include "mojo/shell/standalone/context.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 blocking_pool_.get(), true, | 159 blocking_pool_.get(), true, |
| 160 std::move(app_catalog))); | 160 std::move(app_catalog))); |
| 161 | 161 |
| 162 shell::mojom::InterfaceProviderPtr tracing_remote_interfaces; | 162 shell::mojom::InterfaceProviderPtr tracing_remote_interfaces; |
| 163 shell::mojom::InterfaceProviderPtr tracing_local_interfaces; | 163 shell::mojom::InterfaceProviderPtr tracing_local_interfaces; |
| 164 new TracingInterfaceProvider(&tracer_, GetProxy(&tracing_local_interfaces)); | 164 new TracingInterfaceProvider(&tracer_, GetProxy(&tracing_local_interfaces)); |
| 165 | 165 |
| 166 scoped_ptr<ConnectParams> params(new ConnectParams); | 166 scoped_ptr<ConnectParams> params(new ConnectParams); |
| 167 params->set_source(CreateShellIdentity()); | 167 params->set_source(CreateShellIdentity()); |
| 168 params->set_target(Identity(GURL("mojo:tracing"), std::string(), | 168 params->set_target(Identity(GURL("mojo:tracing"), std::string(), |
| 169 mojom::Connector::kUserInherit, | 169 mojom::Connector::kUserInherit)); |
| 170 GetPermissiveCapabilityFilter())); | |
| 171 params->set_remote_interfaces(GetProxy(&tracing_remote_interfaces)); | 170 params->set_remote_interfaces(GetProxy(&tracing_remote_interfaces)); |
| 172 params->set_local_interfaces(std::move(tracing_local_interfaces)); | 171 params->set_local_interfaces(std::move(tracing_local_interfaces)); |
| 173 application_manager_->Connect(std::move(params)); | 172 application_manager_->Connect(std::move(params)); |
| 174 | 173 |
| 175 if (command_line.HasSwitch(tracing::kTraceStartup)) { | 174 if (command_line.HasSwitch(tracing::kTraceStartup)) { |
| 176 tracing::TraceCollectorPtr coordinator; | 175 tracing::TraceCollectorPtr coordinator; |
| 177 auto coordinator_request = GetProxy(&coordinator); | 176 auto coordinator_request = GetProxy(&coordinator); |
| 178 tracing_remote_interfaces->GetInterface( | 177 tracing_remote_interfaces->GetInterface( |
| 179 tracing::TraceCollector::Name_, coordinator_request.PassMessagePipe()); | 178 tracing::TraceCollector::Name_, coordinator_request.PassMessagePipe()); |
| 180 tracer_.StartCollectingFromTracingService(std::move(coordinator)); | 179 tracer_.StartCollectingFromTracingService(std::move(coordinator)); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 | 229 |
| 231 void Context::Run(const GURL& url) { | 230 void Context::Run(const GURL& url) { |
| 232 application_manager_->SetInstanceQuitCallback( | 231 application_manager_->SetInstanceQuitCallback( |
| 233 base::Bind(&OnInstanceQuit, url)); | 232 base::Bind(&OnInstanceQuit, url)); |
| 234 | 233 |
| 235 shell::mojom::InterfaceProviderPtr remote_interfaces; | 234 shell::mojom::InterfaceProviderPtr remote_interfaces; |
| 236 shell::mojom::InterfaceProviderPtr local_interfaces; | 235 shell::mojom::InterfaceProviderPtr local_interfaces; |
| 237 | 236 |
| 238 scoped_ptr<ConnectParams> params(new ConnectParams); | 237 scoped_ptr<ConnectParams> params(new ConnectParams); |
| 239 params->set_source(CreateShellIdentity()); | 238 params->set_source(CreateShellIdentity()); |
| 240 params->set_target( | 239 params->set_target(Identity(url, std::string(), mojom::Connector::kUserRoot)); |
| 241 Identity(url, std::string(), mojom::Connector::kUserRoot, | |
| 242 GetPermissiveCapabilityFilter())); | |
| 243 params->set_remote_interfaces(GetProxy(&remote_interfaces)); | 240 params->set_remote_interfaces(GetProxy(&remote_interfaces)); |
| 244 params->set_local_interfaces(std::move(local_interfaces)); | 241 params->set_local_interfaces(std::move(local_interfaces)); |
| 245 application_manager_->Connect(std::move(params)); | 242 application_manager_->Connect(std::move(params)); |
| 246 } | 243 } |
| 247 | 244 |
| 248 } // namespace shell | 245 } // namespace shell |
| 249 } // namespace mojo | 246 } // namespace mojo |
| OLD | NEW |