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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 #else | 139 #else |
140 // TODO(port) | 140 // TODO(port) |
141 #include "base/memory/scoped_handle.h" | 141 #include "base/memory/scoped_handle.h" |
142 #include "content/child/npapi/np_channel_base.h" | 142 #include "content/child/npapi/np_channel_base.h" |
143 #endif | 143 #endif |
144 | 144 |
145 #if defined(ENABLE_PLUGINS) | 145 #if defined(ENABLE_PLUGINS) |
146 #include "content/renderer/npapi/plugin_channel_host.h" | 146 #include "content/renderer/npapi/plugin_channel_host.h" |
147 #endif | 147 #endif |
148 | 148 |
| 149 #if defined(USE_MOJO) |
| 150 #include "content/renderer/mojo/mojo_render_process_observer.h" |
| 151 #endif |
| 152 |
149 using base::ThreadRestrictions; | 153 using base::ThreadRestrictions; |
150 using blink::WebDocument; | 154 using blink::WebDocument; |
151 using blink::WebFrame; | 155 using blink::WebFrame; |
152 using blink::WebNetworkStateNotifier; | 156 using blink::WebNetworkStateNotifier; |
153 using blink::WebRuntimeFeatures; | 157 using blink::WebRuntimeFeatures; |
154 using blink::WebScriptController; | 158 using blink::WebScriptController; |
155 using blink::WebSecurityPolicy; | 159 using blink::WebSecurityPolicy; |
156 using blink::WebString; | 160 using blink::WebString; |
157 using blink::WebView; | 161 using blink::WebView; |
158 | 162 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 audio_message_filter_ = new AudioMessageFilter(GetIOMessageLoopProxy()); | 390 audio_message_filter_ = new AudioMessageFilter(GetIOMessageLoopProxy()); |
387 AddFilter(audio_message_filter_.get()); | 391 AddFilter(audio_message_filter_.get()); |
388 | 392 |
389 midi_message_filter_ = new MidiMessageFilter(GetIOMessageLoopProxy()); | 393 midi_message_filter_ = new MidiMessageFilter(GetIOMessageLoopProxy()); |
390 AddFilter(midi_message_filter_.get()); | 394 AddFilter(midi_message_filter_.get()); |
391 | 395 |
392 AddFilter((new IndexedDBMessageFilter(thread_safe_sender()))->GetFilter()); | 396 AddFilter((new IndexedDBMessageFilter(thread_safe_sender()))->GetFilter()); |
393 | 397 |
394 AddFilter((new EmbeddedWorkerContextMessageFilter())->GetFilter()); | 398 AddFilter((new EmbeddedWorkerContextMessageFilter())->GetFilter()); |
395 | 399 |
| 400 #if defined(USE_MOJO) |
| 401 // MojoRenderProcessObserver deletes itself as necessary. |
| 402 new MojoRenderProcessObserver(this); |
| 403 #endif |
| 404 |
396 GetContentClient()->renderer()->RenderThreadStarted(); | 405 GetContentClient()->renderer()->RenderThreadStarted(); |
397 | 406 |
398 InitSkiaEventTracer(); | 407 InitSkiaEventTracer(); |
399 | 408 |
400 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 409 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
401 if (command_line.HasSwitch(cc::switches::kEnableGpuBenchmarking)) | 410 if (command_line.HasSwitch(cc::switches::kEnableGpuBenchmarking)) |
402 RegisterExtension(GpuBenchmarkingExtension::Get()); | 411 RegisterExtension(GpuBenchmarkingExtension::Get()); |
403 | 412 |
404 is_impl_side_painting_enabled_ = | 413 is_impl_side_painting_enabled_ = |
405 command_line.HasSwitch(switches::kEnableImplSidePainting) && | 414 command_line.HasSwitch(switches::kEnableImplSidePainting) && |
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1489 hidden_widget_count_--; | 1498 hidden_widget_count_--; |
1490 | 1499 |
1491 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1500 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1492 return; | 1501 return; |
1493 } | 1502 } |
1494 | 1503 |
1495 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1504 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1496 } | 1505 } |
1497 | 1506 |
1498 } // namespace content | 1507 } // namespace content |
OLD | NEW |