| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" | 60 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" |
| 61 #include "content/browser/loader/resource_message_filter.h" | 61 #include "content/browser/loader/resource_message_filter.h" |
| 62 #include "content/browser/loader/resource_scheduler_filter.h" | 62 #include "content/browser/loader/resource_scheduler_filter.h" |
| 63 #include "content/browser/media/android/browser_demuxer_android.h" | 63 #include "content/browser/media/android/browser_demuxer_android.h" |
| 64 #include "content/browser/media/capture/audio_mirroring_manager.h" | 64 #include "content/browser/media/capture/audio_mirroring_manager.h" |
| 65 #include "content/browser/media/media_internals.h" | 65 #include "content/browser/media/media_internals.h" |
| 66 #include "content/browser/message_port_message_filter.h" | 66 #include "content/browser/message_port_message_filter.h" |
| 67 #include "content/browser/mime_registry_message_filter.h" | 67 #include "content/browser/mime_registry_message_filter.h" |
| 68 #include "content/browser/plugin_service_impl.h" | 68 #include "content/browser/plugin_service_impl.h" |
| 69 #include "content/browser/profiler_message_filter.h" | 69 #include "content/browser/profiler_message_filter.h" |
| 70 #include "content/browser/push_messaging_message_filter.h" |
| 70 #include "content/browser/quota_dispatcher_host.h" | 71 #include "content/browser/quota_dispatcher_host.h" |
| 71 #include "content/browser/renderer_host/clipboard_message_filter.h" | 72 #include "content/browser/renderer_host/clipboard_message_filter.h" |
| 72 #include "content/browser/renderer_host/database_message_filter.h" | 73 #include "content/browser/renderer_host/database_message_filter.h" |
| 73 #include "content/browser/renderer_host/file_utilities_message_filter.h" | 74 #include "content/browser/renderer_host/file_utilities_message_filter.h" |
| 74 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" | 75 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" |
| 75 #include "content/browser/renderer_host/gpu_message_filter.h" | 76 #include "content/browser/renderer_host/gpu_message_filter.h" |
| 76 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" | 77 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" |
| 77 #include "content/browser/renderer_host/media/audio_renderer_host.h" | 78 #include "content/browser/renderer_host/media/audio_renderer_host.h" |
| 78 #include "content/browser/renderer_host/media/device_request_message_filter.h" | 79 #include "content/browser/renderer_host/media/device_request_message_filter.h" |
| 79 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" | 80 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); | 828 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); |
| 828 AddFilter(new HistogramMessageFilter()); | 829 AddFilter(new HistogramMessageFilter()); |
| 829 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) | 830 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
| 830 if (CommandLine::ForCurrentProcess()->HasSwitch( | 831 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 831 switches::kEnableMemoryBenchmarking)) | 832 switches::kEnableMemoryBenchmarking)) |
| 832 AddFilter(new MemoryBenchmarkMessageFilter()); | 833 AddFilter(new MemoryBenchmarkMessageFilter()); |
| 833 #endif | 834 #endif |
| 834 AddFilter(new VibrationMessageFilter()); | 835 AddFilter(new VibrationMessageFilter()); |
| 835 screen_orientation_dispatcher_host_ = new ScreenOrientationDispatcherHost(); | 836 screen_orientation_dispatcher_host_ = new ScreenOrientationDispatcherHost(); |
| 836 AddFilter(screen_orientation_dispatcher_host_); | 837 AddFilter(screen_orientation_dispatcher_host_); |
| 838 AddFilter(new PushMessagingMessageFilter()); |
| 837 } | 839 } |
| 838 | 840 |
| 839 int RenderProcessHostImpl::GetNextRoutingID() { | 841 int RenderProcessHostImpl::GetNextRoutingID() { |
| 840 return widget_helper_->GetNextRoutingID(); | 842 return widget_helper_->GetNextRoutingID(); |
| 841 } | 843 } |
| 842 | 844 |
| 843 | 845 |
| 844 void RenderProcessHostImpl::ResumeDeferredNavigation( | 846 void RenderProcessHostImpl::ResumeDeferredNavigation( |
| 845 const GlobalRequestID& request_id) { | 847 const GlobalRequestID& request_id) { |
| 846 widget_helper_->ResumeDeferredNavigation(request_id); | 848 widget_helper_->ResumeDeferredNavigation(request_id); |
| (...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2149 | 2151 |
| 2150 void RenderProcessHostImpl::SetWebUIHandle( | 2152 void RenderProcessHostImpl::SetWebUIHandle( |
| 2151 int32 view_routing_id, | 2153 int32 view_routing_id, |
| 2152 mojo::ScopedMessagePipeHandle handle) { | 2154 mojo::ScopedMessagePipeHandle handle) { |
| 2153 if (!render_process_host_mojo_) | 2155 if (!render_process_host_mojo_) |
| 2154 render_process_host_mojo_.reset(new RenderProcessHostMojoImpl(this)); | 2156 render_process_host_mojo_.reset(new RenderProcessHostMojoImpl(this)); |
| 2155 render_process_host_mojo_->SetWebUIHandle(view_routing_id, handle.Pass()); | 2157 render_process_host_mojo_->SetWebUIHandle(view_routing_id, handle.Pass()); |
| 2156 } | 2158 } |
| 2157 | 2159 |
| 2158 } // namespace content | 2160 } // namespace content |
| OLD | NEW |