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

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

Powered by Google App Engine
This is Rietveld 408576698