| 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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 void ChildThreadImpl::EnsureConnected() { | 855 void ChildThreadImpl::EnsureConnected() { |
| 855 VLOG(0) << "ChildThreadImpl::EnsureConnected()"; | 856 VLOG(0) << "ChildThreadImpl::EnsureConnected()"; |
| 856 base::Process::Current().Terminate(0, false); | 857 base::Process::Current().Terminate(0, false); |
| 857 } | 858 } |
| 858 | 859 |
| 859 bool ChildThreadImpl::IsInBrowserProcess() const { | 860 bool ChildThreadImpl::IsInBrowserProcess() const { |
| 860 return static_cast<bool>(browser_process_io_runner_); | 861 return static_cast<bool>(browser_process_io_runner_); |
| 861 } | 862 } |
| 862 | 863 |
| 863 } // namespace content | 864 } // namespace content |
| OLD | NEW |