| 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
| 6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
| 7 | 7 |
| 8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 #include "content/browser/renderer_host/websocket_dispatcher_host.h" | 97 #include "content/browser/renderer_host/websocket_dispatcher_host.h" |
| 98 #include "content/browser/resolve_proxy_msg_helper.h" | 98 #include "content/browser/resolve_proxy_msg_helper.h" |
| 99 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 99 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
| 100 #include "content/browser/service_worker/service_worker_dispatcher_host.h" | 100 #include "content/browser/service_worker/service_worker_dispatcher_host.h" |
| 101 #include "content/browser/shared_worker/shared_worker_message_filter.h" | 101 #include "content/browser/shared_worker/shared_worker_message_filter.h" |
| 102 #include "content/browser/speech/speech_recognition_dispatcher_host.h" | 102 #include "content/browser/speech/speech_recognition_dispatcher_host.h" |
| 103 #include "content/browser/storage_partition_impl.h" | 103 #include "content/browser/storage_partition_impl.h" |
| 104 #include "content/browser/streams/stream_context.h" | 104 #include "content/browser/streams/stream_context.h" |
| 105 #include "content/browser/tracing/trace_message_filter.h" | 105 #include "content/browser/tracing/trace_message_filter.h" |
| 106 #include "content/browser/vibration/vibration_message_filter.h" | 106 #include "content/browser/vibration/vibration_message_filter.h" |
| 107 #include "content/browser/wake_lock/wake_lock_dispatcher_host.h" |
| 107 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 108 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
| 108 #include "content/browser/worker_host/worker_message_filter.h" | 109 #include "content/browser/worker_host/worker_message_filter.h" |
| 109 #include "content/browser/worker_host/worker_storage_partition.h" | 110 #include "content/browser/worker_host/worker_storage_partition.h" |
| 110 #include "content/common/child_process_host_impl.h" | 111 #include "content/common/child_process_host_impl.h" |
| 111 #include "content/common/child_process_messages.h" | 112 #include "content/common/child_process_messages.h" |
| 112 #include "content/common/content_switches_internal.h" | 113 #include "content/common/content_switches_internal.h" |
| 113 #include "content/common/gpu/client/gpu_memory_buffer_impl.h" | 114 #include "content/common/gpu/client/gpu_memory_buffer_impl.h" |
| 114 #include "content/common/gpu/client/gpu_memory_buffer_impl_shm.h" | 115 #include "content/common/gpu/client/gpu_memory_buffer_impl_shm.h" |
| 115 #include "content/common/gpu/gpu_messages.h" | 116 #include "content/common/gpu/gpu_messages.h" |
| 116 #include "content/common/mojo/mojo_messages.h" | 117 #include "content/common/mojo/mojo_messages.h" |
| (...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 AddFilter(new HistogramMessageFilter()); | 880 AddFilter(new HistogramMessageFilter()); |
| 880 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) | 881 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
| 881 if (CommandLine::ForCurrentProcess()->HasSwitch( | 882 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 882 switches::kEnableMemoryBenchmarking)) | 883 switches::kEnableMemoryBenchmarking)) |
| 883 AddFilter(new MemoryBenchmarkMessageFilter()); | 884 AddFilter(new MemoryBenchmarkMessageFilter()); |
| 884 #endif | 885 #endif |
| 885 AddFilter(new VibrationMessageFilter()); | 886 AddFilter(new VibrationMessageFilter()); |
| 886 AddFilter(new PushMessagingMessageFilter( | 887 AddFilter(new PushMessagingMessageFilter( |
| 887 GetID(), storage_partition_impl_->GetServiceWorkerContext())); | 888 GetID(), storage_partition_impl_->GetServiceWorkerContext())); |
| 888 AddFilter(new BatteryStatusMessageFilter()); | 889 AddFilter(new BatteryStatusMessageFilter()); |
| 890 AddFilter(new WakeLockDispatcherHost(GetID(), |
| 891 browser_context->GetWakeLockPermissionContext())); |
| 889 } | 892 } |
| 890 | 893 |
| 891 int RenderProcessHostImpl::GetNextRoutingID() { | 894 int RenderProcessHostImpl::GetNextRoutingID() { |
| 892 return widget_helper_->GetNextRoutingID(); | 895 return widget_helper_->GetNextRoutingID(); |
| 893 } | 896 } |
| 894 | 897 |
| 895 | 898 |
| 896 void RenderProcessHostImpl::ResumeDeferredNavigation( | 899 void RenderProcessHostImpl::ResumeDeferredNavigation( |
| 897 const GlobalRequestID& request_id) { | 900 const GlobalRequestID& request_id) { |
| 898 widget_helper_->ResumeDeferredNavigation(request_id); | 901 widget_helper_->ResumeDeferredNavigation(request_id); |
| (...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2362 void RenderProcessHostImpl::GpuMemoryBufferAllocated( | 2365 void RenderProcessHostImpl::GpuMemoryBufferAllocated( |
| 2363 IPC::Message* reply, | 2366 IPC::Message* reply, |
| 2364 const gfx::GpuMemoryBufferHandle& handle) { | 2367 const gfx::GpuMemoryBufferHandle& handle) { |
| 2365 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2368 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2366 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, | 2369 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, |
| 2367 handle); | 2370 handle); |
| 2368 Send(reply); | 2371 Send(reply); |
| 2369 } | 2372 } |
| 2370 | 2373 |
| 2371 } // namespace content | 2374 } // namespace content |
| OLD | NEW |