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

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

Issue 1538803002: Migrates battery_status from content/renderer/ to WebKit/platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 #ifndef CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_
6 #define CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ 6 #define CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 13 matching lines...) Expand all
24 24
25 namespace cc { 25 namespace cc {
26 class ContextProvider; 26 class ContextProvider;
27 } 27 }
28 28
29 namespace IPC { 29 namespace IPC {
30 class SyncMessageFilter; 30 class SyncMessageFilter;
31 } 31 }
32 32
33 namespace blink { 33 namespace blink {
34 class WebBatteryStatus;
35 class WebCanvasCaptureHandler; 34 class WebCanvasCaptureHandler;
36 class WebDeviceMotionData; 35 class WebDeviceMotionData;
37 class WebDeviceOrientationData; 36 class WebDeviceOrientationData;
38 class WebGraphicsContext3DProvider; 37 class WebGraphicsContext3DProvider;
39 class WebMediaPlayer; 38 class WebMediaPlayer;
40 class WebMediaRecorderHandler; 39 class WebMediaRecorderHandler;
41 class WebMediaStream; 40 class WebMediaStream;
42 class WebServiceWorkerCacheStorage; 41 class WebServiceWorkerCacheStorage;
43 } 42 }
44 43
45 namespace scheduler { 44 namespace scheduler {
46 class RendererScheduler; 45 class RendererScheduler;
47 class WebThreadImplForRendererScheduler; 46 class WebThreadImplForRendererScheduler;
48 } 47 }
49 48
50 namespace content { 49 namespace content {
51 class BatteryStatusDispatcher;
52 class DeviceLightEventPump; 50 class DeviceLightEventPump;
53 class DeviceMotionEventPump; 51 class DeviceMotionEventPump;
54 class DeviceOrientationEventPump; 52 class DeviceOrientationEventPump;
55 class PlatformEventObserverBase; 53 class PlatformEventObserverBase;
56 class QuotaMessageFilter; 54 class QuotaMessageFilter;
57 class RendererClipboardDelegate; 55 class RendererClipboardDelegate;
58 class RenderView; 56 class RenderView;
59 class ThreadSafeSender; 57 class ThreadSafeSender;
60 class WebClipboardImpl; 58 class WebClipboardImpl;
61 class WebDatabaseObserverImpl; 59 class WebDatabaseObserverImpl;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 blink::WebGraphicsContext3D* createOffscreenGraphicsContext3D( 166 blink::WebGraphicsContext3D* createOffscreenGraphicsContext3D(
169 const blink::WebGraphicsContext3D::Attributes& attributes, 167 const blink::WebGraphicsContext3D::Attributes& attributes,
170 blink::WebGraphicsContext3D* share_context, 168 blink::WebGraphicsContext3D* share_context,
171 blink::WebGraphicsContext3D::WebGraphicsInfo* gl_info) override; 169 blink::WebGraphicsContext3D::WebGraphicsInfo* gl_info) override;
172 blink::WebGraphicsContext3DProvider* 170 blink::WebGraphicsContext3DProvider*
173 createSharedOffscreenGraphicsContext3DProvider() override; 171 createSharedOffscreenGraphicsContext3DProvider() override;
174 blink::WebCompositorSupport* compositorSupport() override; 172 blink::WebCompositorSupport* compositorSupport() override;
175 blink::WebString convertIDNToUnicode( 173 blink::WebString convertIDNToUnicode(
176 const blink::WebString& host, 174 const blink::WebString& host,
177 const blink::WebString& languages) override; 175 const blink::WebString& languages) override;
176 void connectToRemoteService(const char* name,
177 mojo::ScopedMessagePipeHandle handle) override;
178 void startListening(blink::WebPlatformEventType, 178 void startListening(blink::WebPlatformEventType,
179 blink::WebPlatformEventListener*) override; 179 blink::WebPlatformEventListener*) override;
180 void stopListening(blink::WebPlatformEventType) override; 180 void stopListening(blink::WebPlatformEventType) override;
181 void queryStorageUsageAndQuota(const blink::WebURL& storage_partition, 181 void queryStorageUsageAndQuota(const blink::WebURL& storage_partition,
182 blink::WebStorageQuotaType, 182 blink::WebStorageQuotaType,
183 blink::WebStorageQuotaCallbacks) override; 183 blink::WebStorageQuotaCallbacks) override;
184 void vibrate(unsigned int milliseconds) override; 184 void vibrate(unsigned int milliseconds) override;
185 void cancelVibration() override; 185 void cancelVibration() override;
186 blink::WebThread* currentThread() override; 186 blink::WebThread* currentThread() override;
187 void recordRappor(const char* metric, 187 void recordRappor(const char* metric,
(...skipping 22 matching lines...) Expand all
210 // Set a double to return when setDeviceLightListener is invoked. 210 // Set a double to return when setDeviceLightListener is invoked.
211 static void SetMockDeviceLightDataForTesting(double data); 211 static void SetMockDeviceLightDataForTesting(double data);
212 // Set WebDeviceMotionData to return when setDeviceMotionListener is invoked. 212 // Set WebDeviceMotionData to return when setDeviceMotionListener is invoked.
213 static void SetMockDeviceMotionDataForTesting( 213 static void SetMockDeviceMotionDataForTesting(
214 const blink::WebDeviceMotionData& data); 214 const blink::WebDeviceMotionData& data);
215 // Set WebDeviceOrientationData to return when setDeviceOrientationListener 215 // Set WebDeviceOrientationData to return when setDeviceOrientationListener
216 // is invoked. 216 // is invoked.
217 static void SetMockDeviceOrientationDataForTesting( 217 static void SetMockDeviceOrientationDataForTesting(
218 const blink::WebDeviceOrientationData& data); 218 const blink::WebDeviceOrientationData& data);
219 219
220 // Notifies blink::WebBatteryStatusListener that battery status has changed.
221 void MockBatteryStatusChangedForTesting(
222 const blink::WebBatteryStatus& status);
223
224 WebDatabaseObserverImpl* web_database_observer_impl() { 220 WebDatabaseObserverImpl* web_database_observer_impl() {
225 return web_database_observer_impl_.get(); 221 return web_database_observer_impl_.get();
226 } 222 }
227 223
228 blink::WebURLLoader* createURLLoader() override; 224 blink::WebURLLoader* createURLLoader() override;
229 225
230 private: 226 private:
231 bool CheckPreparsedJsCachingEnabled() const; 227 bool CheckPreparsedJsCachingEnabled() const;
232 228
233 // Factory that takes a type and return PlatformEventObserverBase that matches 229 // Factory that takes a type and return PlatformEventObserverBase that matches
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_; 276 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_;
281 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 277 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
282 scoped_refptr<QuotaMessageFilter> quota_message_filter_; 278 scoped_refptr<QuotaMessageFilter> quota_message_filter_;
283 279
284 scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_; 280 scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_;
285 281
286 cc_blink::WebCompositorSupportImpl compositor_support_; 282 cc_blink::WebCompositorSupportImpl compositor_support_;
287 283
288 scoped_ptr<blink::WebScrollbarBehavior> web_scrollbar_behavior_; 284 scoped_ptr<blink::WebScrollbarBehavior> web_scrollbar_behavior_;
289 285
290 scoped_ptr<BatteryStatusDispatcher> battery_status_dispatcher_;
291
292 // Handle to the Vibration mojo service. 286 // Handle to the Vibration mojo service.
293 device::VibrationManagerPtr vibration_manager_; 287 device::VibrationManagerPtr vibration_manager_;
294 288
295 IDMap<PlatformEventObserverBase, IDMapOwnPointer> platform_event_observers_; 289 IDMap<PlatformEventObserverBase, IDMapOwnPointer> platform_event_observers_;
296 290
297 scheduler::RendererScheduler* renderer_scheduler_; // NOT OWNED 291 scheduler::RendererScheduler* renderer_scheduler_; // NOT OWNED
298 292
299 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl); 293 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl);
300 }; 294 };
301 295
302 } // namespace content 296 } // namespace content
303 297
304 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ 298 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698