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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 audio_message_filter_ = new AudioMessageFilter(GetIOMessageLoopProxy()); | 398 audio_message_filter_ = new AudioMessageFilter(GetIOMessageLoopProxy()); |
399 AddFilter(audio_message_filter_.get()); | 399 AddFilter(audio_message_filter_.get()); |
400 | 400 |
401 midi_message_filter_ = new MidiMessageFilter(GetIOMessageLoopProxy()); | 401 midi_message_filter_ = new MidiMessageFilter(GetIOMessageLoopProxy()); |
402 AddFilter(midi_message_filter_.get()); | 402 AddFilter(midi_message_filter_.get()); |
403 | 403 |
404 AddFilter((new IndexedDBMessageFilter(thread_safe_sender()))->GetFilter()); | 404 AddFilter((new IndexedDBMessageFilter(thread_safe_sender()))->GetFilter()); |
405 | 405 |
406 AddFilter((new EmbeddedWorkerContextMessageFilter())->GetFilter()); | 406 AddFilter((new EmbeddedWorkerContextMessageFilter())->GetFilter()); |
407 | 407 |
408 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader()); | |
409 AddObserver(gamepad_shared_memory_reader_.get()); | |
410 | |
411 GetContentClient()->renderer()->RenderThreadStarted(); | 408 GetContentClient()->renderer()->RenderThreadStarted(); |
412 | 409 |
413 InitSkiaEventTracer(); | 410 InitSkiaEventTracer(); |
414 | 411 |
415 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 412 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
416 if (command_line.HasSwitch(cc::switches::kEnableGpuBenchmarking)) | 413 if (command_line.HasSwitch(cc::switches::kEnableGpuBenchmarking)) |
417 RegisterExtension(GpuBenchmarkingExtension::Get()); | 414 RegisterExtension(GpuBenchmarkingExtension::Get()); |
418 | 415 |
419 is_impl_side_painting_enabled_ = | 416 is_impl_side_painting_enabled_ = |
420 command_line.HasSwitch(switches::kEnableImplSidePainting); | 417 command_line.HasSwitch(switches::kEnableImplSidePainting); |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 scoped_refptr<base::MessageLoopProxy> output_surface_loop; | 782 scoped_refptr<base::MessageLoopProxy> output_surface_loop; |
786 if (enable) | 783 if (enable) |
787 output_surface_loop = compositor_message_loop_proxy_; | 784 output_surface_loop = compositor_message_loop_proxy_; |
788 else | 785 else |
789 output_surface_loop = base::MessageLoopProxy::current(); | 786 output_surface_loop = base::MessageLoopProxy::current(); |
790 | 787 |
791 compositor_output_surface_filter_ = | 788 compositor_output_surface_filter_ = |
792 CompositorOutputSurface::CreateFilter(output_surface_loop.get()); | 789 CompositorOutputSurface::CreateFilter(output_surface_loop.get()); |
793 AddFilter(compositor_output_surface_filter_.get()); | 790 AddFilter(compositor_output_surface_filter_.get()); |
794 | 791 |
| 792 gamepad_shared_memory_reader_.reset( |
| 793 new GamepadSharedMemoryReader(webkit_platform_support_.get())); |
| 794 AddObserver(gamepad_shared_memory_reader_.get()); |
| 795 |
795 RenderThreadImpl::RegisterSchemes(); | 796 RenderThreadImpl::RegisterSchemes(); |
796 | 797 |
797 EnableBlinkPlatformLogChannels( | 798 EnableBlinkPlatformLogChannels( |
798 command_line.GetSwitchValueASCII(switches::kBlinkPlatformLogChannels)); | 799 command_line.GetSwitchValueASCII(switches::kBlinkPlatformLogChannels)); |
799 | 800 |
800 SetRuntimeFeaturesDefaultsAndUpdateFromArgs(command_line); | 801 SetRuntimeFeaturesDefaultsAndUpdateFromArgs(command_line); |
801 | 802 |
802 if (!media::IsMediaLibraryInitialized()) { | 803 if (!media::IsMediaLibraryInitialized()) { |
803 WebRuntimeFeatures::enableMediaPlayer(false); | 804 WebRuntimeFeatures::enableMediaPlayer(false); |
804 WebRuntimeFeatures::enableWebAudio(false); | 805 WebRuntimeFeatures::enableWebAudio(false); |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1519 hidden_widget_count_--; | 1520 hidden_widget_count_--; |
1520 | 1521 |
1521 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1522 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1522 return; | 1523 return; |
1523 } | 1524 } |
1524 | 1525 |
1525 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1526 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1526 } | 1527 } |
1527 | 1528 |
1528 } // namespace content | 1529 } // namespace content |
OLD | NEW |