| 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/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 #include "content/renderer/media/audio_message_filter.h" | 75 #include "content/renderer/media/audio_message_filter.h" |
| 76 #include "content/renderer/media/audio_renderer_mixer_manager.h" | 76 #include "content/renderer/media/audio_renderer_mixer_manager.h" |
| 77 #include "content/renderer/media/media_stream_center.h" | 77 #include "content/renderer/media/media_stream_center.h" |
| 78 #include "content/renderer/media/media_stream_dependency_factory.h" | 78 #include "content/renderer/media/media_stream_dependency_factory.h" |
| 79 #include "content/renderer/media/midi_message_filter.h" | 79 #include "content/renderer/media/midi_message_filter.h" |
| 80 #include "content/renderer/media/peer_connection_tracker.h" | 80 #include "content/renderer/media/peer_connection_tracker.h" |
| 81 #include "content/renderer/media/renderer_gpu_video_accelerator_factories.h" | 81 #include "content/renderer/media/renderer_gpu_video_accelerator_factories.h" |
| 82 #include "content/renderer/media/video_capture_impl_manager.h" | 82 #include "content/renderer/media/video_capture_impl_manager.h" |
| 83 #include "content/renderer/media/video_capture_message_filter.h" | 83 #include "content/renderer/media/video_capture_message_filter.h" |
| 84 #include "content/renderer/media/webrtc_identity_service.h" | 84 #include "content/renderer/media/webrtc_identity_service.h" |
| 85 #include "content/renderer/mojo/mojo_render_process_observer.h" |
| 85 #include "content/renderer/p2p/socket_dispatcher.h" | 86 #include "content/renderer/p2p/socket_dispatcher.h" |
| 86 #include "content/renderer/render_process_impl.h" | 87 #include "content/renderer/render_process_impl.h" |
| 87 #include "content/renderer/render_view_impl.h" | 88 #include "content/renderer/render_view_impl.h" |
| 88 #include "content/renderer/renderer_webkitplatformsupport_impl.h" | 89 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
| 89 #include "content/renderer/service_worker/embedded_worker_context_message_filter
.h" | 90 #include "content/renderer/service_worker/embedded_worker_context_message_filter
.h" |
| 90 #include "content/renderer/service_worker/embedded_worker_dispatcher.h" | 91 #include "content/renderer/service_worker/embedded_worker_dispatcher.h" |
| 91 #include "content/renderer/shared_worker/embedded_shared_worker_stub.h" | 92 #include "content/renderer/shared_worker/embedded_shared_worker_stub.h" |
| 92 #include "grit/content_resources.h" | 93 #include "grit/content_resources.h" |
| 93 #include "ipc/ipc_channel_handle.h" | 94 #include "ipc/ipc_channel_handle.h" |
| 94 #include "ipc/ipc_forwarding_message_filter.h" | 95 #include "ipc/ipc_forwarding_message_filter.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 #else | 140 #else |
| 140 // TODO(port) | 141 // TODO(port) |
| 141 #include "base/memory/scoped_handle.h" | 142 #include "base/memory/scoped_handle.h" |
| 142 #include "content/child/npapi/np_channel_base.h" | 143 #include "content/child/npapi/np_channel_base.h" |
| 143 #endif | 144 #endif |
| 144 | 145 |
| 145 #if defined(ENABLE_PLUGINS) | 146 #if defined(ENABLE_PLUGINS) |
| 146 #include "content/renderer/npapi/plugin_channel_host.h" | 147 #include "content/renderer/npapi/plugin_channel_host.h" |
| 147 #endif | 148 #endif |
| 148 | 149 |
| 149 #if defined(USE_MOJO) | |
| 150 #include "content/renderer/mojo/mojo_render_process_observer.h" | |
| 151 #endif | |
| 152 | |
| 153 using base::ThreadRestrictions; | 150 using base::ThreadRestrictions; |
| 154 using blink::WebDocument; | 151 using blink::WebDocument; |
| 155 using blink::WebFrame; | 152 using blink::WebFrame; |
| 156 using blink::WebNetworkStateNotifier; | 153 using blink::WebNetworkStateNotifier; |
| 157 using blink::WebRuntimeFeatures; | 154 using blink::WebRuntimeFeatures; |
| 158 using blink::WebScriptController; | 155 using blink::WebScriptController; |
| 159 using blink::WebSecurityPolicy; | 156 using blink::WebSecurityPolicy; |
| 160 using blink::WebString; | 157 using blink::WebString; |
| 161 using blink::WebView; | 158 using blink::WebView; |
| 162 | 159 |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 audio_message_filter_ = new AudioMessageFilter(GetIOMessageLoopProxy()); | 387 audio_message_filter_ = new AudioMessageFilter(GetIOMessageLoopProxy()); |
| 391 AddFilter(audio_message_filter_.get()); | 388 AddFilter(audio_message_filter_.get()); |
| 392 | 389 |
| 393 midi_message_filter_ = new MidiMessageFilter(GetIOMessageLoopProxy()); | 390 midi_message_filter_ = new MidiMessageFilter(GetIOMessageLoopProxy()); |
| 394 AddFilter(midi_message_filter_.get()); | 391 AddFilter(midi_message_filter_.get()); |
| 395 | 392 |
| 396 AddFilter((new IndexedDBMessageFilter(thread_safe_sender()))->GetFilter()); | 393 AddFilter((new IndexedDBMessageFilter(thread_safe_sender()))->GetFilter()); |
| 397 | 394 |
| 398 AddFilter((new EmbeddedWorkerContextMessageFilter())->GetFilter()); | 395 AddFilter((new EmbeddedWorkerContextMessageFilter())->GetFilter()); |
| 399 | 396 |
| 400 #if defined(USE_MOJO) | |
| 401 // MojoRenderProcessObserver deletes itself as necessary. | 397 // MojoRenderProcessObserver deletes itself as necessary. |
| 402 new MojoRenderProcessObserver(this); | 398 new MojoRenderProcessObserver(this); |
| 403 #endif | |
| 404 | 399 |
| 405 GetContentClient()->renderer()->RenderThreadStarted(); | 400 GetContentClient()->renderer()->RenderThreadStarted(); |
| 406 | 401 |
| 407 InitSkiaEventTracer(); | 402 InitSkiaEventTracer(); |
| 408 | 403 |
| 409 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 404 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 410 if (command_line.HasSwitch(cc::switches::kEnableGpuBenchmarking)) | 405 if (command_line.HasSwitch(cc::switches::kEnableGpuBenchmarking)) |
| 411 RegisterExtension(GpuBenchmarkingExtension::Get()); | 406 RegisterExtension(GpuBenchmarkingExtension::Get()); |
| 412 | 407 |
| 413 is_impl_side_painting_enabled_ = | 408 is_impl_side_painting_enabled_ = |
| (...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1519 hidden_widget_count_--; | 1514 hidden_widget_count_--; |
| 1520 | 1515 |
| 1521 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1516 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
| 1522 return; | 1517 return; |
| 1523 } | 1518 } |
| 1524 | 1519 |
| 1525 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1520 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
| 1526 } | 1521 } |
| 1527 | 1522 |
| 1528 } // namespace content | 1523 } // namespace content |
| OLD | NEW |