| 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.h" | 5 #include "content/child/child_thread.h" |
| 6 | 6 |
| 7 #include <signal.h> | 7 #include <signal.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #include "content/child/service_worker/service_worker_message_filter.h" | 37 #include "content/child/service_worker/service_worker_message_filter.h" |
| 38 #include "content/child/socket_stream_dispatcher.h" | 38 #include "content/child/socket_stream_dispatcher.h" |
| 39 #include "content/child/thread_safe_sender.h" | 39 #include "content/child/thread_safe_sender.h" |
| 40 #include "content/child/websocket_dispatcher.h" | 40 #include "content/child/websocket_dispatcher.h" |
| 41 #include "content/common/child_process_messages.h" | 41 #include "content/common/child_process_messages.h" |
| 42 #include "content/public/common/content_switches.h" | 42 #include "content/public/common/content_switches.h" |
| 43 #include "ipc/ipc_logging.h" | 43 #include "ipc/ipc_logging.h" |
| 44 #include "ipc/ipc_switches.h" | 44 #include "ipc/ipc_switches.h" |
| 45 #include "ipc/ipc_sync_channel.h" | 45 #include "ipc/ipc_sync_channel.h" |
| 46 #include "ipc/ipc_sync_message_filter.h" | 46 #include "ipc/ipc_sync_message_filter.h" |
| 47 #include "webkit/child/resource_loader_bridge.h" | |
| 48 | 47 |
| 49 #if defined(OS_WIN) | 48 #if defined(OS_WIN) |
| 50 #include "content/common/handle_enumerator_win.h" | 49 #include "content/common/handle_enumerator_win.h" |
| 51 #endif | 50 #endif |
| 52 | 51 |
| 53 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) | 52 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) |
| 54 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" | 53 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" |
| 55 #endif | 54 #endif |
| 56 | 55 |
| 57 using tracked_objects::ThreadData; | 56 using tracked_objects::ThreadData; |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 } | 354 } |
| 356 | 355 |
| 357 return channel_->Send(msg); | 356 return channel_->Send(msg); |
| 358 } | 357 } |
| 359 | 358 |
| 360 MessageRouter* ChildThread::GetRouter() { | 359 MessageRouter* ChildThread::GetRouter() { |
| 361 DCHECK(base::MessageLoop::current() == message_loop()); | 360 DCHECK(base::MessageLoop::current() == message_loop()); |
| 362 return &router_; | 361 return &router_; |
| 363 } | 362 } |
| 364 | 363 |
| 365 webkit_glue::ResourceLoaderBridge* ChildThread::CreateBridge( | |
| 366 const RequestInfo& request_info) { | |
| 367 return resource_dispatcher()->CreateBridge(request_info); | |
| 368 } | |
| 369 | |
| 370 base::SharedMemory* ChildThread::AllocateSharedMemory(size_t buf_size) { | 364 base::SharedMemory* ChildThread::AllocateSharedMemory(size_t buf_size) { |
| 371 return AllocateSharedMemory(buf_size, this); | 365 return AllocateSharedMemory(buf_size, this); |
| 372 } | 366 } |
| 373 | 367 |
| 374 // static | 368 // static |
| 375 base::SharedMemory* ChildThread::AllocateSharedMemory( | 369 base::SharedMemory* ChildThread::AllocateSharedMemory( |
| 376 size_t buf_size, | 370 size_t buf_size, |
| 377 IPC::Sender* sender) { | 371 IPC::Sender* sender) { |
| 378 scoped_ptr<base::SharedMemory> shared_buf; | 372 scoped_ptr<base::SharedMemory> shared_buf; |
| 379 #if defined(OS_WIN) | 373 #if defined(OS_WIN) |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 // inflight that would addref it. | 525 // inflight that would addref it. |
| 532 Send(new ChildProcessHostMsg_ShutdownRequest); | 526 Send(new ChildProcessHostMsg_ShutdownRequest); |
| 533 } | 527 } |
| 534 | 528 |
| 535 void ChildThread::EnsureConnected() { | 529 void ChildThread::EnsureConnected() { |
| 536 VLOG(0) << "ChildThread::EnsureConnected()"; | 530 VLOG(0) << "ChildThread::EnsureConnected()"; |
| 537 base::KillProcess(base::GetCurrentProcessHandle(), 0, false); | 531 base::KillProcess(base::GetCurrentProcessHandle(), 0, false); |
| 538 } | 532 } |
| 539 | 533 |
| 540 } // namespace content | 534 } // namespace content |
| OLD | NEW |