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

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

Issue 258173004: [NO SUBMIT] Battery Status API skeleton implementation ASYNC Base URL: https://chromium.googlesource.com/chromium/src.git@April-17-battery-status-renderer-and-IPC
Patch Set: Created 6 years, 7 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
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.h ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_webkitplatformsupport_impl.h" 5 #include "content/renderer/renderer_webkitplatformsupport_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/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 22 matching lines...) Expand all
33 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 33 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
34 #include "content/common/gpu/gpu_process_launch_causes.h" 34 #include "content/common/gpu/gpu_process_launch_causes.h"
35 #include "content/common/mime_registry_messages.h" 35 #include "content/common/mime_registry_messages.h"
36 #include "content/common/screen_orientation_messages.h" 36 #include "content/common/screen_orientation_messages.h"
37 #include "content/common/view_messages.h" 37 #include "content/common/view_messages.h"
38 #include "content/public/common/content_switches.h" 38 #include "content/public/common/content_switches.h"
39 #include "content/public/common/webplugininfo.h" 39 #include "content/public/common/webplugininfo.h"
40 #include "content/public/renderer/content_renderer_client.h" 40 #include "content/public/renderer/content_renderer_client.h"
41 #include "content/renderer/device_sensors/device_motion_event_pump.h" 41 #include "content/renderer/device_sensors/device_motion_event_pump.h"
42 #include "content/renderer/device_sensors/device_orientation_event_pump.h" 42 #include "content/renderer/device_sensors/device_orientation_event_pump.h"
43 #include "content/renderer/battery_status/battery_status_dispatcher.h"
43 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" 44 #include "content/renderer/dom_storage/webstoragenamespace_impl.h"
44 #include "content/renderer/gamepad_shared_memory_reader.h" 45 #include "content/renderer/gamepad_shared_memory_reader.h"
45 #include "content/renderer/media/audio_decoder.h" 46 #include "content/renderer/media/audio_decoder.h"
46 #include "content/renderer/media/crypto/key_systems.h" 47 #include "content/renderer/media/crypto/key_systems.h"
47 #include "content/renderer/media/media_stream_dependency_factory.h" 48 #include "content/renderer/media/media_stream_dependency_factory.h"
48 #include "content/renderer/media/renderer_webaudiodevice_impl.h" 49 #include "content/renderer/media/renderer_webaudiodevice_impl.h"
49 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" 50 #include "content/renderer/media/renderer_webmidiaccessor_impl.h"
50 #include "content/renderer/media/webcontentdecryptionmodule_impl.h" 51 #include "content/renderer/media/webcontentdecryptionmodule_impl.h"
51 #include "content/renderer/render_thread_impl.h" 52 #include "content/renderer/render_thread_impl.h"
52 #include "content/renderer/renderer_clipboard_client.h" 53 #include "content/renderer/renderer_clipboard_client.h"
53 #include "content/renderer/screen_orientation/screen_orientation_dispatcher.h" 54 #include "content/renderer/screen_orientation/screen_orientation_dispatcher.h"
54 #include "content/renderer/webclipboard_impl.h" 55 #include "content/renderer/webclipboard_impl.h"
55 #include "content/renderer/webgraphicscontext3d_provider_impl.h" 56 #include "content/renderer/webgraphicscontext3d_provider_impl.h"
56 #include "content/renderer/webpublicsuffixlist_impl.h" 57 #include "content/renderer/webpublicsuffixlist_impl.h"
57 #include "gpu/config/gpu_info.h" 58 #include "gpu/config/gpu_info.h"
58 #include "ipc/ipc_sync_message_filter.h" 59 #include "ipc/ipc_sync_message_filter.h"
59 #include "media/audio/audio_output_device.h" 60 #include "media/audio/audio_output_device.h"
60 #include "media/base/audio_hardware_config.h" 61 #include "media/base/audio_hardware_config.h"
61 #include "media/filters/stream_parser_factory.h" 62 #include "media/filters/stream_parser_factory.h"
62 #include "net/base/mime_util.h" 63 #include "net/base/mime_util.h"
63 #include "net/base/net_util.h" 64 #include "net/base/net_util.h"
64 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" 65 #include "third_party/WebKit/public/platform/WebBlobRegistry.h"
65 #include "third_party/WebKit/public/platform/WebDeviceMotionListener.h" 66 #include "third_party/WebKit/public/platform/WebDeviceMotionListener.h"
66 #include "third_party/WebKit/public/platform/WebDeviceOrientationListener.h" 67 #include "third_party/WebKit/public/platform/WebDeviceOrientationListener.h"
68 #include "third_party/WebKit/public/platform/WebBatteryListener.h"
67 #include "third_party/WebKit/public/platform/WebFileInfo.h" 69 #include "third_party/WebKit/public/platform/WebFileInfo.h"
68 #include "third_party/WebKit/public/platform/WebGamepads.h" 70 #include "third_party/WebKit/public/platform/WebGamepads.h"
69 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" 71 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h"
70 #include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h" 72 #include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h"
71 #include "third_party/WebKit/public/platform/WebPluginListBuilder.h" 73 #include "third_party/WebKit/public/platform/WebPluginListBuilder.h"
72 #include "third_party/WebKit/public/platform/WebScreenOrientationListener.h" 74 #include "third_party/WebKit/public/platform/WebScreenOrientationListener.h"
73 #include "third_party/WebKit/public/platform/WebURL.h" 75 #include "third_party/WebKit/public/platform/WebURL.h"
74 #include "third_party/WebKit/public/platform/WebVector.h" 76 #include "third_party/WebKit/public/platform/WebVector.h"
75 #include "ui/gfx/color_profile.h" 77 #include "ui/gfx/color_profile.h"
76 #include "url/gurl.h" 78 #include "url/gurl.h"
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 } 1101 }
1100 1102
1101 // static 1103 // static
1102 void RendererWebKitPlatformSupportImpl::SetMockDeviceOrientationDataForTesting( 1104 void RendererWebKitPlatformSupportImpl::SetMockDeviceOrientationDataForTesting(
1103 const blink::WebDeviceOrientationData& data) { 1105 const blink::WebDeviceOrientationData& data) {
1104 g_test_device_orientation_data.Get() = data; 1106 g_test_device_orientation_data.Get() = data;
1105 } 1107 }
1106 1108
1107 //------------------------------------------------------------------------------ 1109 //------------------------------------------------------------------------------
1108 1110
1111
1112 void RendererWebKitPlatformSupportImpl::setBatteryStatusListener(
1113 blink::WebBatteryListener* listener) {
1114 if (!battery_status_dispatcher_) {
1115 battery_status_dispatcher_.reset(new BatteryStatusDispatcher);
1116 battery_status_dispatcher_->Attach(RenderThreadImpl::current());
1117 }
1118 battery_status_dispatcher_->SetListener(listener);
1119 }
1120
1121
1122
1123
1124 //--------------------------
1109 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) { 1125 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) {
1110 RenderThread::Get()->Send( 1126 RenderThread::Get()->Send(
1111 new ViewHostMsg_Vibrate(base::checked_cast<int64>(milliseconds))); 1127 new ViewHostMsg_Vibrate(base::checked_cast<int64>(milliseconds)));
1112 } 1128 }
1113 1129
1114 void RendererWebKitPlatformSupportImpl::cancelVibration() { 1130 void RendererWebKitPlatformSupportImpl::cancelVibration() {
1115 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration()); 1131 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration());
1116 } 1132 }
1117 1133
1118 //------------------------------------------------------------------------------ 1134 //------------------------------------------------------------------------------
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 return; 1188 return;
1173 QuotaDispatcher::ThreadSpecificInstance( 1189 QuotaDispatcher::ThreadSpecificInstance(
1174 thread_safe_sender_.get(), 1190 thread_safe_sender_.get(),
1175 quota_message_filter_.get())->QueryStorageUsageAndQuota( 1191 quota_message_filter_.get())->QueryStorageUsageAndQuota(
1176 storage_partition, 1192 storage_partition,
1177 static_cast<quota::StorageType>(type), 1193 static_cast<quota::StorageType>(type),
1178 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); 1194 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
1179 } 1195 }
1180 1196
1181 } // namespace content 1197 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.h ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698