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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 } // namespace | 293 } // namespace |
294 | 294 |
295 ChildThread* ChildThread::Get() { | 295 ChildThread* ChildThread::Get() { |
296 return ChildThreadImpl::current(); | 296 return ChildThreadImpl::current(); |
297 } | 297 } |
298 | 298 |
299 ChildThreadImpl::Options::Options() | 299 ChildThreadImpl::Options::Options() |
300 : channel_name(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 300 : channel_name(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
301 switches::kProcessChannelID)), | 301 switches::kProcessChannelID)), |
302 use_mojo_channel(base::CommandLine::ForCurrentProcess()->HasSwitch( | 302 use_mojo_channel(base::CommandLine::ForCurrentProcess()->HasSwitch( |
303 switches::kMojoApplicationChannelToken)), | 303 switches::kMojoChannelToken)), |
304 auto_start_mojo_shell_connection(true), | 304 auto_start_mojo_shell_connection(true), |
305 connect_to_browser(false) { | 305 connect_to_browser(false) { |
306 } | 306 } |
307 | 307 |
308 ChildThreadImpl::Options::Options(const Options& other) = default; | 308 ChildThreadImpl::Options::Options(const Options& other) = default; |
309 | 309 |
310 ChildThreadImpl::Options::~Options() { | 310 ChildThreadImpl::Options::~Options() { |
311 } | 311 } |
312 | 312 |
313 ChildThreadImpl::Options::Builder::Builder() { | 313 ChildThreadImpl::Options::Builder::Builder() { |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
860 void ChildThreadImpl::EnsureConnected() { | 860 void ChildThreadImpl::EnsureConnected() { |
861 VLOG(0) << "ChildThreadImpl::EnsureConnected()"; | 861 VLOG(0) << "ChildThreadImpl::EnsureConnected()"; |
862 base::Process::Current().Terminate(0, false); | 862 base::Process::Current().Terminate(0, false); |
863 } | 863 } |
864 | 864 |
865 bool ChildThreadImpl::IsInBrowserProcess() const { | 865 bool ChildThreadImpl::IsInBrowserProcess() const { |
866 return static_cast<bool>(browser_process_io_runner_); | 866 return static_cast<bool>(browser_process_io_runner_); |
867 } | 867 } |
868 | 868 |
869 } // namespace content | 869 } // namespace content |
OLD | NEW |