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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 406 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
407 switches::kMojoApplicationChannelToken); | 407 switches::kMojoApplicationChannelToken); |
408 } else { | 408 } else { |
409 mojo_application_token = options.in_process_application_token; | 409 mojo_application_token = options.in_process_application_token; |
410 } | 410 } |
411 if (!mojo_application_token.empty()) { | 411 if (!mojo_application_token.empty()) { |
412 mojo::ScopedMessagePipeHandle handle = | 412 mojo::ScopedMessagePipeHandle handle = |
413 mojo::edk::CreateChildMessagePipe(mojo_application_token); | 413 mojo::edk::CreateChildMessagePipe(mojo_application_token); |
414 DCHECK(handle.is_valid()); | 414 DCHECK(handle.is_valid()); |
415 mojo_shell_connection_ = MojoShellConnection::Create( | 415 mojo_shell_connection_ = MojoShellConnection::Create( |
416 mojo::MakeRequest<shell::mojom::ShellClient>(std::move(handle))); | 416 mojo::MakeRequest<shell::mojom::Service>(std::move(handle))); |
417 mojo_shell_connection_->AddEmbeddedShellClient(this); | 417 mojo_shell_connection_->MergeService(this); |
418 } | 418 } |
419 | 419 |
420 sync_message_filter_ = channel_->CreateSyncMessageFilter(); | 420 sync_message_filter_ = channel_->CreateSyncMessageFilter(); |
421 thread_safe_sender_ = new ThreadSafeSender( | 421 thread_safe_sender_ = new ThreadSafeSender( |
422 message_loop_->task_runner(), sync_message_filter_.get()); | 422 message_loop_->task_runner(), sync_message_filter_.get()); |
423 | 423 |
424 resource_dispatcher_.reset(new ResourceDispatcher( | 424 resource_dispatcher_.reset(new ResourceDispatcher( |
425 this, message_loop()->task_runner())); | 425 this, message_loop()->task_runner())); |
426 websocket_dispatcher_.reset(new WebSocketDispatcher); | 426 websocket_dispatcher_.reset(new WebSocketDispatcher); |
427 file_system_dispatcher_.reset(new FileSystemDispatcher()); | 427 file_system_dispatcher_.reset(new FileSystemDispatcher()); |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 void ChildThreadImpl::EnsureConnected() { | 766 void ChildThreadImpl::EnsureConnected() { |
767 VLOG(0) << "ChildThreadImpl::EnsureConnected()"; | 767 VLOG(0) << "ChildThreadImpl::EnsureConnected()"; |
768 base::Process::Current().Terminate(0, false); | 768 base::Process::Current().Terminate(0, false); |
769 } | 769 } |
770 | 770 |
771 bool ChildThreadImpl::IsInBrowserProcess() const { | 771 bool ChildThreadImpl::IsInBrowserProcess() const { |
772 return static_cast<bool>(browser_process_io_runner_); | 772 return static_cast<bool>(browser_process_io_runner_); |
773 } | 773 } |
774 | 774 |
775 } // namespace content | 775 } // namespace content |
OLD | NEW |