OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/child/child_thread_impl.h" | 5 #include "content/child/child_thread_impl.h" |
6 | 6 |
7 #include <signal.h> | 7 #include <signal.h> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 } // namespace | 289 } // namespace |
290 | 290 |
291 ChildThread* ChildThread::Get() { | 291 ChildThread* ChildThread::Get() { |
292 return ChildThreadImpl::current(); | 292 return ChildThreadImpl::current(); |
293 } | 293 } |
294 | 294 |
295 ChildThreadImpl::Options::Options() | 295 ChildThreadImpl::Options::Options() |
296 : channel_name(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 296 : channel_name(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
297 switches::kProcessChannelID)), | 297 switches::kProcessChannelID)), |
298 use_mojo_channel(base::CommandLine::ForCurrentProcess()->HasSwitch( | 298 use_mojo_channel(base::CommandLine::ForCurrentProcess()->HasSwitch( |
299 switches::kMojoApplicationChannelToken)), | 299 switches::kMojoApplicationChannelToken) || |
| 300 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 301 switches::kMojoChannelToken)), |
300 auto_start_mojo_shell_connection(true), | 302 auto_start_mojo_shell_connection(true), |
301 connect_to_browser(false) { | 303 connect_to_browser(false) {} |
302 } | |
303 | 304 |
304 ChildThreadImpl::Options::Options(const Options& other) = default; | 305 ChildThreadImpl::Options::Options(const Options& other) = default; |
305 | 306 |
306 ChildThreadImpl::Options::~Options() { | 307 ChildThreadImpl::Options::~Options() { |
307 } | 308 } |
308 | 309 |
309 ChildThreadImpl::Options::Builder::Builder() { | 310 ChildThreadImpl::Options::Builder::Builder() { |
310 } | 311 } |
311 | 312 |
312 ChildThreadImpl::Options::Builder& | 313 ChildThreadImpl::Options::Builder& |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
895 associated_interface_provider_bindings_.dispatch_context())); | 896 associated_interface_provider_bindings_.dispatch_context())); |
896 router_.GetRoute(routing_id)->OnAssociatedInterfaceRequest( | 897 router_.GetRoute(routing_id)->OnAssociatedInterfaceRequest( |
897 name, request.PassHandle()); | 898 name, request.PassHandle()); |
898 } | 899 } |
899 | 900 |
900 bool ChildThreadImpl::IsInBrowserProcess() const { | 901 bool ChildThreadImpl::IsInBrowserProcess() const { |
901 return static_cast<bool>(browser_process_io_runner_); | 902 return static_cast<bool>(browser_process_io_runner_); |
902 } | 903 } |
903 | 904 |
904 } // namespace content | 905 } // namespace content |
OLD | NEW |