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 27 matching lines...) Expand all Loading... |
38 #include "content/child/service_worker/service_worker_message_filter.h" | 38 #include "content/child/service_worker/service_worker_message_filter.h" |
39 #include "content/child/socket_stream_dispatcher.h" | 39 #include "content/child/socket_stream_dispatcher.h" |
40 #include "content/child/thread_safe_sender.h" | 40 #include "content/child/thread_safe_sender.h" |
41 #include "content/child/websocket_dispatcher.h" | 41 #include "content/child/websocket_dispatcher.h" |
42 #include "content/common/child_process_messages.h" | 42 #include "content/common/child_process_messages.h" |
43 #include "content/public/common/content_switches.h" | 43 #include "content/public/common/content_switches.h" |
44 #include "ipc/ipc_logging.h" | 44 #include "ipc/ipc_logging.h" |
45 #include "ipc/ipc_switches.h" | 45 #include "ipc/ipc_switches.h" |
46 #include "ipc/ipc_sync_channel.h" | 46 #include "ipc/ipc_sync_channel.h" |
47 #include "ipc/ipc_sync_message_filter.h" | 47 #include "ipc/ipc_sync_message_filter.h" |
| 48 #include "webkit/child/resource_loader_bridge.h" |
48 | 49 |
49 #if defined(OS_WIN) | 50 #if defined(OS_WIN) |
50 #include "content/common/handle_enumerator_win.h" | 51 #include "content/common/handle_enumerator_win.h" |
51 #endif | 52 #endif |
52 | 53 |
53 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) | 54 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) |
54 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" | 55 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" |
55 #endif | 56 #endif |
56 | 57 |
57 using tracked_objects::ThreadData; | 58 using tracked_objects::ThreadData; |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 } | 367 } |
367 | 368 |
368 return channel_->Send(msg); | 369 return channel_->Send(msg); |
369 } | 370 } |
370 | 371 |
371 MessageRouter* ChildThread::GetRouter() { | 372 MessageRouter* ChildThread::GetRouter() { |
372 DCHECK(base::MessageLoop::current() == message_loop()); | 373 DCHECK(base::MessageLoop::current() == message_loop()); |
373 return &router_; | 374 return &router_; |
374 } | 375 } |
375 | 376 |
| 377 webkit_glue::ResourceLoaderBridge* ChildThread::CreateBridge( |
| 378 const RequestInfo& request_info) { |
| 379 return resource_dispatcher()->CreateBridge(request_info); |
| 380 } |
| 381 |
376 base::SharedMemory* ChildThread::AllocateSharedMemory(size_t buf_size) { | 382 base::SharedMemory* ChildThread::AllocateSharedMemory(size_t buf_size) { |
377 return AllocateSharedMemory(buf_size, this); | 383 return AllocateSharedMemory(buf_size, this); |
378 } | 384 } |
379 | 385 |
380 // static | 386 // static |
381 base::SharedMemory* ChildThread::AllocateSharedMemory( | 387 base::SharedMemory* ChildThread::AllocateSharedMemory( |
382 size_t buf_size, | 388 size_t buf_size, |
383 IPC::Sender* sender) { | 389 IPC::Sender* sender) { |
384 scoped_ptr<base::SharedMemory> shared_buf; | 390 scoped_ptr<base::SharedMemory> shared_buf; |
385 #if defined(OS_WIN) | 391 #if defined(OS_WIN) |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 // inflight that would addref it. | 546 // inflight that would addref it. |
541 Send(new ChildProcessHostMsg_ShutdownRequest); | 547 Send(new ChildProcessHostMsg_ShutdownRequest); |
542 } | 548 } |
543 | 549 |
544 void ChildThread::EnsureConnected() { | 550 void ChildThread::EnsureConnected() { |
545 VLOG(0) << "ChildThread::EnsureConnected()"; | 551 VLOG(0) << "ChildThread::EnsureConnected()"; |
546 base::KillProcess(base::GetCurrentProcessHandle(), 0, false); | 552 base::KillProcess(base::GetCurrentProcessHandle(), 0, false); |
547 } | 553 } |
548 | 554 |
549 } // namespace content | 555 } // namespace content |
OLD | NEW |