Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(714)

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 470683002: Revert "Refactor code listening to platform events in content/renderer/." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 #include "content/public/common/url_constants.h" 65 #include "content/public/common/url_constants.h"
66 #include "content/public/renderer/content_renderer_client.h" 66 #include "content/public/renderer/content_renderer_client.h"
67 #include "content/public/renderer/render_process_observer.h" 67 #include "content/public/renderer/render_process_observer.h"
68 #include "content/public/renderer/render_view_visitor.h" 68 #include "content/public/renderer/render_view_visitor.h"
69 #include "content/renderer/compositor_bindings/web_external_bitmap_impl.h" 69 #include "content/renderer/compositor_bindings/web_external_bitmap_impl.h"
70 #include "content/renderer/compositor_bindings/web_layer_impl.h" 70 #include "content/renderer/compositor_bindings/web_layer_impl.h"
71 #include "content/renderer/devtools/devtools_agent_filter.h" 71 #include "content/renderer/devtools/devtools_agent_filter.h"
72 #include "content/renderer/dom_storage/dom_storage_dispatcher.h" 72 #include "content/renderer/dom_storage/dom_storage_dispatcher.h"
73 #include "content/renderer/dom_storage/webstoragearea_impl.h" 73 #include "content/renderer/dom_storage/webstoragearea_impl.h"
74 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" 74 #include "content/renderer/dom_storage/webstoragenamespace_impl.h"
75 #include "content/renderer/gamepad_shared_memory_reader.h"
75 #include "content/renderer/gpu/compositor_output_surface.h" 76 #include "content/renderer/gpu/compositor_output_surface.h"
76 #include "content/renderer/gpu/gpu_benchmarking_extension.h" 77 #include "content/renderer/gpu/gpu_benchmarking_extension.h"
77 #include "content/renderer/input/input_event_filter.h" 78 #include "content/renderer/input/input_event_filter.h"
78 #include "content/renderer/input/input_handler_manager.h" 79 #include "content/renderer/input/input_handler_manager.h"
79 #include "content/renderer/media/aec_dump_message_filter.h" 80 #include "content/renderer/media/aec_dump_message_filter.h"
80 #include "content/renderer/media/audio_input_message_filter.h" 81 #include "content/renderer/media/audio_input_message_filter.h"
81 #include "content/renderer/media/audio_message_filter.h" 82 #include "content/renderer/media/audio_message_filter.h"
82 #include "content/renderer/media/audio_renderer_mixer_manager.h" 83 #include "content/renderer/media/audio_renderer_mixer_manager.h"
83 #include "content/renderer/media/media_stream_center.h" 84 #include "content/renderer/media/media_stream_center.h"
84 #include "content/renderer/media/midi_message_filter.h" 85 #include "content/renderer/media/midi_message_filter.h"
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 scoped_refptr<base::MessageLoopProxy> output_surface_loop; 891 scoped_refptr<base::MessageLoopProxy> output_surface_loop;
891 if (enable) 892 if (enable)
892 output_surface_loop = compositor_message_loop_proxy_; 893 output_surface_loop = compositor_message_loop_proxy_;
893 else 894 else
894 output_surface_loop = base::MessageLoopProxy::current(); 895 output_surface_loop = base::MessageLoopProxy::current();
895 896
896 compositor_output_surface_filter_ = 897 compositor_output_surface_filter_ =
897 CompositorOutputSurface::CreateFilter(output_surface_loop.get()); 898 CompositorOutputSurface::CreateFilter(output_surface_loop.get());
898 AddFilter(compositor_output_surface_filter_.get()); 899 AddFilter(compositor_output_surface_filter_.get());
899 900
901 gamepad_shared_memory_reader_.reset(
902 new GamepadSharedMemoryReader(webkit_platform_support_.get()));
903 AddObserver(gamepad_shared_memory_reader_.get());
904
900 RenderThreadImpl::RegisterSchemes(); 905 RenderThreadImpl::RegisterSchemes();
901 906
902 EnableBlinkPlatformLogChannels( 907 EnableBlinkPlatformLogChannels(
903 command_line.GetSwitchValueASCII(switches::kBlinkPlatformLogChannels)); 908 command_line.GetSwitchValueASCII(switches::kBlinkPlatformLogChannels));
904 909
905 SetRuntimeFeaturesDefaultsAndUpdateFromArgs(command_line); 910 SetRuntimeFeaturesDefaultsAndUpdateFromArgs(command_line);
906 911
907 if (!media::IsMediaLibraryInitialized()) { 912 if (!media::IsMediaLibraryInitialized()) {
908 WebRuntimeFeatures::enableMediaPlayer(false); 913 WebRuntimeFeatures::enableMediaPlayer(false);
909 WebRuntimeFeatures::enableWebAudio(false); 914 WebRuntimeFeatures::enableWebAudio(false);
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1605 1610
1606 void RenderThreadImpl::SetFlingCurveParameters( 1611 void RenderThreadImpl::SetFlingCurveParameters(
1607 const std::vector<float>& new_touchpad, 1612 const std::vector<float>& new_touchpad,
1608 const std::vector<float>& new_touchscreen) { 1613 const std::vector<float>& new_touchscreen) {
1609 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, 1614 webkit_platform_support_->SetFlingCurveParameters(new_touchpad,
1610 new_touchscreen); 1615 new_touchscreen);
1611 1616
1612 } 1617 }
1613 1618
1614 void RenderThreadImpl::SampleGamepads(blink::WebGamepads* data) { 1619 void RenderThreadImpl::SampleGamepads(blink::WebGamepads* data) {
1615 webkit_platform_support_->sampleGamepads(*data); 1620 gamepad_shared_memory_reader_->SampleGamepads(*data);
1621 }
1622
1623 void RenderThreadImpl::SetGamepadListener(blink::WebGamepadListener* listener) {
1624 gamepad_shared_memory_reader_->SetGamepadListener(listener);
1616 } 1625 }
1617 1626
1618 void RenderThreadImpl::WidgetCreated() { 1627 void RenderThreadImpl::WidgetCreated() {
1619 widget_count_++; 1628 widget_count_++;
1620 } 1629 }
1621 1630
1622 void RenderThreadImpl::WidgetDestroyed() { 1631 void RenderThreadImpl::WidgetDestroyed() {
1623 widget_count_--; 1632 widget_count_--;
1624 } 1633 }
1625 1634
(...skipping 18 matching lines...) Expand all
1644 hidden_widget_count_--; 1653 hidden_widget_count_--;
1645 1654
1646 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { 1655 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) {
1647 return; 1656 return;
1648 } 1657 }
1649 1658
1650 ScheduleIdleHandler(kLongIdleHandlerDelayMs); 1659 ScheduleIdleHandler(kLongIdleHandlerDelayMs);
1651 } 1660 }
1652 1661
1653 } // namespace content 1662 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/renderer_webkitplatformsupport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698