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