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

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

Issue 1088053003: Patch 1/3 to get WebScheduler via WebThread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 "content/child/database_util.h" 18 #include "content/child/database_util.h"
19 #include "content/child/file_info_util.h" 19 #include "content/child/file_info_util.h"
20 #include "content/child/fileapi/webfilesystem_impl.h" 20 #include "content/child/fileapi/webfilesystem_impl.h"
21 #include "content/child/indexed_db/webidbfactory_impl.h" 21 #include "content/child/indexed_db/webidbfactory_impl.h"
22 #include "content/child/npapi/npobject_util.h" 22 #include "content/child/npapi/npobject_util.h"
23 #include "content/child/quota_dispatcher.h" 23 #include "content/child/quota_dispatcher.h"
24 #include "content/child/quota_message_filter.h" 24 #include "content/child/quota_message_filter.h"
25 #include "content/child/scheduler/web_scheduler_impl.h"
25 #include "content/child/simple_webmimeregistry_impl.h" 26 #include "content/child/simple_webmimeregistry_impl.h"
26 #include "content/child/thread_safe_sender.h" 27 #include "content/child/thread_safe_sender.h"
27 #include "content/child/web_database_observer_impl.h" 28 #include "content/child/web_database_observer_impl.h"
28 #include "content/child/webblobregistry_impl.h" 29 #include "content/child/webblobregistry_impl.h"
29 #include "content/child/webfileutilities_impl.h" 30 #include "content/child/webfileutilities_impl.h"
30 #include "content/child/webmessageportchannel_impl.h" 31 #include "content/child/webmessageportchannel_impl.h"
31 #include "content/common/file_utilities_messages.h" 32 #include "content/common/file_utilities_messages.h"
32 #include "content/common/gpu/client/context_provider_command_buffer.h" 33 #include "content/common/gpu/client/context_provider_command_buffer.h"
33 #include "content/common/gpu/client/gpu_channel_host.h" 34 #include "content/common/gpu/client/gpu_channel_host.h"
34 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 35 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
(...skipping 10 matching lines...) Expand all
45 #include "content/renderer/device_sensors/device_motion_event_pump.h" 46 #include "content/renderer/device_sensors/device_motion_event_pump.h"
46 #include "content/renderer/device_sensors/device_orientation_event_pump.h" 47 #include "content/renderer/device_sensors/device_orientation_event_pump.h"
47 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" 48 #include "content/renderer/dom_storage/webstoragenamespace_impl.h"
48 #include "content/renderer/gamepad_shared_memory_reader.h" 49 #include "content/renderer/gamepad_shared_memory_reader.h"
49 #include "content/renderer/media/audio_decoder.h" 50 #include "content/renderer/media/audio_decoder.h"
50 #include "content/renderer/media/renderer_webaudiodevice_impl.h" 51 #include "content/renderer/media/renderer_webaudiodevice_impl.h"
51 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" 52 #include "content/renderer/media/renderer_webmidiaccessor_impl.h"
52 #include "content/renderer/render_thread_impl.h" 53 #include "content/renderer/render_thread_impl.h"
53 #include "content/renderer/renderer_clipboard_delegate.h" 54 #include "content/renderer/renderer_clipboard_delegate.h"
54 #include "content/renderer/scheduler/renderer_scheduler.h" 55 #include "content/renderer/scheduler/renderer_scheduler.h"
55 #include "content/renderer/scheduler/web_scheduler_impl.h"
56 #include "content/renderer/scheduler/webthread_impl_for_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"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 RendererScheduler* renderer_scheduler)
225 : BlinkPlatformImpl(renderer_scheduler->DefaultTaskRunner()), 225 : BlinkPlatformImpl(renderer_scheduler->DefaultTaskRunner()),
226 web_scheduler_(new WebSchedulerImpl(renderer_scheduler)), 226 web_scheduler_(
227 new WebSchedulerImpl(renderer_scheduler,
228 renderer_scheduler->IdleTaskRunner(),
229 renderer_scheduler->LoadingTaskRunner(),
230 renderer_scheduler->TimerTaskRunner())),
227 main_thread_(new WebThreadImplForRendererScheduler(renderer_scheduler)), 231 main_thread_(new WebThreadImplForRendererScheduler(renderer_scheduler)),
228 clipboard_delegate_(new RendererClipboardDelegate), 232 clipboard_delegate_(new RendererClipboardDelegate),
229 clipboard_(new WebClipboardImpl(clipboard_delegate_.get())), 233 clipboard_(new WebClipboardImpl(clipboard_delegate_.get())),
230 mime_registry_(new RendererBlinkPlatformImpl::MimeRegistry), 234 mime_registry_(new RendererBlinkPlatformImpl::MimeRegistry),
231 sudden_termination_disables_(0), 235 sudden_termination_disables_(0),
232 plugin_refresh_allowed_(true), 236 plugin_refresh_allowed_(true),
233 default_task_runner_(renderer_scheduler->DefaultTaskRunner()), 237 default_task_runner_(renderer_scheduler->DefaultTaskRunner()),
234 web_scrollbar_behavior_(new WebScrollbarBehaviorImpl) { 238 web_scrollbar_behavior_(new WebScrollbarBehaviorImpl) {
235 #if !defined(OS_ANDROID) && !defined(OS_WIN) 239 #if !defined(OS_ANDROID) && !defined(OS_WIN)
236 if (g_sandbox_enabled && sandboxEnabled()) { 240 if (g_sandbox_enabled && sandboxEnabled()) {
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 //------------------------------------------------------------------------------ 1235 //------------------------------------------------------------------------------
1232 1236
1233 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( 1237 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting(
1234 const blink::WebBatteryStatus& status) { 1238 const blink::WebBatteryStatus& status) {
1235 if (!g_test_battery_status_listener) 1239 if (!g_test_battery_status_listener)
1236 return; 1240 return;
1237 g_test_battery_status_listener->updateBatteryStatus(status); 1241 g_test_battery_status_listener->updateBatteryStatus(status);
1238 } 1242 }
1239 1243
1240 } // namespace content 1244 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698