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

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

Issue 1058873010: Move blink scheduler implementation into a component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 8 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
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/renderer_blink_platform_impl.h" 5 #include "content/renderer/renderer_blink_platform_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/shared_memory.h" 11 #include "base/memory/shared_memory.h"
12 #include "base/message_loop/message_loop_proxy.h" 12 #include "base/message_loop/message_loop_proxy.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/numerics/safe_conversions.h" 14 #include "base/numerics/safe_conversions.h"
15 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
16 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
17 #include "cc/blink/context_provider_web_context.h" 17 #include "cc/blink/context_provider_web_context.h"
18 #include "components/scheduler/child/web_scheduler_impl.h"
19 #include "components/scheduler/renderer/renderer_scheduler.h"
20 #include "components/scheduler/renderer/webthread_impl_for_renderer_scheduler.h"
18 #include "content/child/database_util.h" 21 #include "content/child/database_util.h"
19 #include "content/child/file_info_util.h" 22 #include "content/child/file_info_util.h"
20 #include "content/child/fileapi/webfilesystem_impl.h" 23 #include "content/child/fileapi/webfilesystem_impl.h"
21 #include "content/child/indexed_db/webidbfactory_impl.h" 24 #include "content/child/indexed_db/webidbfactory_impl.h"
22 #include "content/child/npapi/npobject_util.h" 25 #include "content/child/npapi/npobject_util.h"
23 #include "content/child/quota_dispatcher.h" 26 #include "content/child/quota_dispatcher.h"
24 #include "content/child/quota_message_filter.h" 27 #include "content/child/quota_message_filter.h"
25 #include "content/child/scheduler/web_scheduler_impl.h"
26 #include "content/child/simple_webmimeregistry_impl.h" 28 #include "content/child/simple_webmimeregistry_impl.h"
27 #include "content/child/thread_safe_sender.h" 29 #include "content/child/thread_safe_sender.h"
28 #include "content/child/web_database_observer_impl.h" 30 #include "content/child/web_database_observer_impl.h"
29 #include "content/child/webblobregistry_impl.h" 31 #include "content/child/webblobregistry_impl.h"
30 #include "content/child/webfileutilities_impl.h" 32 #include "content/child/webfileutilities_impl.h"
31 #include "content/child/webmessageportchannel_impl.h" 33 #include "content/child/webmessageportchannel_impl.h"
32 #include "content/common/file_utilities_messages.h" 34 #include "content/common/file_utilities_messages.h"
33 #include "content/common/gpu/client/context_provider_command_buffer.h" 35 #include "content/common/gpu/client/context_provider_command_buffer.h"
34 #include "content/common/gpu/client/gpu_channel_host.h" 36 #include "content/common/gpu/client/gpu_channel_host.h"
35 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 37 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
36 #include "content/common/gpu/gpu_process_launch_causes.h" 38 #include "content/common/gpu/gpu_process_launch_causes.h"
37 #include "content/common/mime_registry_messages.h" 39 #include "content/common/mime_registry_messages.h"
38 #include "content/common/view_messages.h" 40 #include "content/common/view_messages.h"
39 #include "content/public/common/content_switches.h" 41 #include "content/public/common/content_switches.h"
40 #include "content/public/common/service_registry.h" 42 #include "content/public/common/service_registry.h"
41 #include "content/public/common/webplugininfo.h" 43 #include "content/public/common/webplugininfo.h"
42 #include "content/public/renderer/content_renderer_client.h" 44 #include "content/public/renderer/content_renderer_client.h"
43 #include "content/renderer/battery_status/battery_status_dispatcher.h" 45 #include "content/renderer/battery_status/battery_status_dispatcher.h"
44 #include "content/renderer/cache_storage/webserviceworkercachestorage_impl.h" 46 #include "content/renderer/cache_storage/webserviceworkercachestorage_impl.h"
45 #include "content/renderer/device_sensors/device_light_event_pump.h" 47 #include "content/renderer/device_sensors/device_light_event_pump.h"
46 #include "content/renderer/device_sensors/device_motion_event_pump.h" 48 #include "content/renderer/device_sensors/device_motion_event_pump.h"
47 #include "content/renderer/device_sensors/device_orientation_event_pump.h" 49 #include "content/renderer/device_sensors/device_orientation_event_pump.h"
48 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" 50 #include "content/renderer/dom_storage/webstoragenamespace_impl.h"
49 #include "content/renderer/gamepad_shared_memory_reader.h" 51 #include "content/renderer/gamepad_shared_memory_reader.h"
50 #include "content/renderer/media/audio_decoder.h" 52 #include "content/renderer/media/audio_decoder.h"
51 #include "content/renderer/media/renderer_webaudiodevice_impl.h" 53 #include "content/renderer/media/renderer_webaudiodevice_impl.h"
52 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" 54 #include "content/renderer/media/renderer_webmidiaccessor_impl.h"
53 #include "content/renderer/render_thread_impl.h" 55 #include "content/renderer/render_thread_impl.h"
54 #include "content/renderer/renderer_clipboard_delegate.h" 56 #include "content/renderer/renderer_clipboard_delegate.h"
55 #include "content/renderer/scheduler/renderer_scheduler.h"
56 #include "content/renderer/scheduler/webthread_impl_for_renderer_scheduler.h"
57 #include "content/renderer/screen_orientation/screen_orientation_observer.h" 57 #include "content/renderer/screen_orientation/screen_orientation_observer.h"
58 #include "content/renderer/webclipboard_impl.h" 58 #include "content/renderer/webclipboard_impl.h"
59 #include "content/renderer/webgraphicscontext3d_provider_impl.h" 59 #include "content/renderer/webgraphicscontext3d_provider_impl.h"
60 #include "content/renderer/webpublicsuffixlist_impl.h" 60 #include "content/renderer/webpublicsuffixlist_impl.h"
61 #include "gpu/config/gpu_info.h" 61 #include "gpu/config/gpu_info.h"
62 #include "ipc/ipc_sync_message_filter.h" 62 #include "ipc/ipc_sync_message_filter.h"
63 #include "media/audio/audio_output_device.h" 63 #include "media/audio/audio_output_device.h"
64 #include "media/base/audio_hardware_config.h" 64 #include "media/base/audio_hardware_config.h"
65 #include "media/base/key_systems.h" 65 #include "media/base/key_systems.h"
66 #include "media/blink/webcontentdecryptionmodule_impl.h" 66 #include "media/blink/webcontentdecryptionmodule_impl.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 // here. 214 // here.
215 base::Lock unicode_font_families_mutex_; 215 base::Lock unicode_font_families_mutex_;
216 std::map<int32_t, blink::WebFallbackFont> unicode_font_families_; 216 std::map<int32_t, blink::WebFallbackFont> unicode_font_families_;
217 #endif 217 #endif
218 }; 218 };
219 #endif // !defined(OS_ANDROID) && !defined(OS_WIN) 219 #endif // !defined(OS_ANDROID) && !defined(OS_WIN)
220 220
221 //------------------------------------------------------------------------------ 221 //------------------------------------------------------------------------------
222 222
223 RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( 223 RendererBlinkPlatformImpl::RendererBlinkPlatformImpl(
224 RendererScheduler* renderer_scheduler) 224 scheduler::RendererScheduler* renderer_scheduler)
225 : BlinkPlatformImpl(renderer_scheduler->DefaultTaskRunner()), 225 : BlinkPlatformImpl(renderer_scheduler->DefaultTaskRunner()),
226 main_thread_(new WebThreadImplForRendererScheduler(renderer_scheduler)), 226 main_thread_(
227 new scheduler::WebThreadImplForRendererScheduler(renderer_scheduler)),
227 clipboard_delegate_(new RendererClipboardDelegate), 228 clipboard_delegate_(new RendererClipboardDelegate),
228 clipboard_(new WebClipboardImpl(clipboard_delegate_.get())), 229 clipboard_(new WebClipboardImpl(clipboard_delegate_.get())),
229 mime_registry_(new RendererBlinkPlatformImpl::MimeRegistry), 230 mime_registry_(new RendererBlinkPlatformImpl::MimeRegistry),
230 sudden_termination_disables_(0), 231 sudden_termination_disables_(0),
231 plugin_refresh_allowed_(true), 232 plugin_refresh_allowed_(true),
232 default_task_runner_(renderer_scheduler->DefaultTaskRunner()), 233 default_task_runner_(renderer_scheduler->DefaultTaskRunner()),
233 web_scrollbar_behavior_(new WebScrollbarBehaviorImpl) { 234 web_scrollbar_behavior_(new WebScrollbarBehaviorImpl) {
234 #if !defined(OS_ANDROID) && !defined(OS_WIN) 235 #if !defined(OS_ANDROID) && !defined(OS_WIN)
235 if (g_sandbox_enabled && sandboxEnabled()) { 236 if (g_sandbox_enabled && sandboxEnabled()) {
236 sandbox_support_.reset(new RendererBlinkPlatformImpl::SandboxSupport); 237 sandbox_support_.reset(new RendererBlinkPlatformImpl::SandboxSupport);
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 //------------------------------------------------------------------------------ 1227 //------------------------------------------------------------------------------
1227 1228
1228 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( 1229 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting(
1229 const blink::WebBatteryStatus& status) { 1230 const blink::WebBatteryStatus& status) {
1230 if (!g_test_battery_status_listener) 1231 if (!g_test_battery_status_listener)
1231 return; 1232 return;
1232 g_test_battery_status_listener->updateBatteryStatus(status); 1233 g_test_battery_status_listener->updateBatteryStatus(status);
1233 } 1234 }
1234 1235
1235 } // namespace content 1236 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.h ('k') | content/renderer/scheduler/deadline_task_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698