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

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

Issue 1740843002: Revert of 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, 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;
35 class WebCanvasCaptureHandler; 36 class WebCanvasCaptureHandler;
36 class WebDeviceMotionData; 37 class WebDeviceMotionData;
37 class WebDeviceOrientationData; 38 class WebDeviceOrientationData;
38 class WebGraphicsContext3DProvider; 39 class WebGraphicsContext3DProvider;
39 class WebMediaPlayer; 40 class WebMediaPlayer;
40 class WebMediaRecorderHandler; 41 class WebMediaRecorderHandler;
41 class WebMediaStream; 42 class WebMediaStream;
42 class WebSecurityOrigin; 43 class WebSecurityOrigin;
43 class WebServiceWorkerCacheStorage; 44 class WebServiceWorkerCacheStorage;
44 } 45 }
45 46
46 namespace scheduler { 47 namespace scheduler {
47 class RendererScheduler; 48 class RendererScheduler;
48 class WebThreadImplForRendererScheduler; 49 class WebThreadImplForRendererScheduler;
49 } 50 }
50 51
51 namespace content { 52 namespace content {
53 class BatteryStatusDispatcher;
52 class DeviceLightEventPump; 54 class DeviceLightEventPump;
53 class DeviceMotionEventPump; 55 class DeviceMotionEventPump;
54 class DeviceOrientationEventPump; 56 class DeviceOrientationEventPump;
55 class PlatformEventObserverBase; 57 class PlatformEventObserverBase;
56 class QuotaMessageFilter; 58 class QuotaMessageFilter;
57 class RendererClipboardDelegate; 59 class RendererClipboardDelegate;
58 class RenderView; 60 class RenderView;
59 class ThreadSafeSender; 61 class ThreadSafeSender;
60 class WebClipboardImpl; 62 class WebClipboardImpl;
61 class WebDatabaseObserverImpl; 63 class WebDatabaseObserverImpl;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 blink::WebGraphicsContext3D* createOffscreenGraphicsContext3D( 171 blink::WebGraphicsContext3D* createOffscreenGraphicsContext3D(
170 const blink::WebGraphicsContext3D::Attributes& attributes, 172 const blink::WebGraphicsContext3D::Attributes& attributes,
171 blink::WebGraphicsContext3D* share_context, 173 blink::WebGraphicsContext3D* share_context,
172 blink::WebGraphicsContext3D::WebGraphicsInfo* gl_info) override; 174 blink::WebGraphicsContext3D::WebGraphicsInfo* gl_info) override;
173 blink::WebGraphicsContext3DProvider* 175 blink::WebGraphicsContext3DProvider*
174 createSharedOffscreenGraphicsContext3DProvider() override; 176 createSharedOffscreenGraphicsContext3DProvider() override;
175 blink::WebCompositorSupport* compositorSupport() override; 177 blink::WebCompositorSupport* compositorSupport() override;
176 blink::WebString convertIDNToUnicode( 178 blink::WebString convertIDNToUnicode(
177 const blink::WebString& host, 179 const blink::WebString& host,
178 const blink::WebString& languages) override; 180 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
223 WebDatabaseObserverImpl* web_database_observer_impl() { 227 WebDatabaseObserverImpl* web_database_observer_impl() {
224 return web_database_observer_impl_.get(); 228 return web_database_observer_impl_.get();
225 } 229 }
226 230
227 blink::WebURLLoader* createURLLoader() override; 231 blink::WebURLLoader* createURLLoader() override;
228 232
229 private: 233 private:
230 bool CheckPreparsedJsCachingEnabled() const; 234 bool CheckPreparsedJsCachingEnabled() const;
231 235
232 // Factory that takes a type and return PlatformEventObserverBase that matches 236 // Factory that takes a type and return PlatformEventObserverBase that matches
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_; 283 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_;
280 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 284 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
281 scoped_refptr<QuotaMessageFilter> quota_message_filter_; 285 scoped_refptr<QuotaMessageFilter> quota_message_filter_;
282 286
283 scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_; 287 scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_;
284 288
285 cc_blink::WebCompositorSupportImpl compositor_support_; 289 cc_blink::WebCompositorSupportImpl compositor_support_;
286 290
287 scoped_ptr<blink::WebScrollbarBehavior> web_scrollbar_behavior_; 291 scoped_ptr<blink::WebScrollbarBehavior> web_scrollbar_behavior_;
288 292
293 scoped_ptr<BatteryStatusDispatcher> battery_status_dispatcher_;
294
289 // Handle to the Vibration mojo service. 295 // Handle to the Vibration mojo service.
290 device::VibrationManagerPtr vibration_manager_; 296 device::VibrationManagerPtr vibration_manager_;
291 297
292 IDMap<PlatformEventObserverBase, IDMapOwnPointer> platform_event_observers_; 298 IDMap<PlatformEventObserverBase, IDMapOwnPointer> platform_event_observers_;
293 299
294 scheduler::RendererScheduler* renderer_scheduler_; // NOT OWNED 300 scheduler::RendererScheduler* renderer_scheduler_; // NOT OWNED
295 301
296 TrialTokenValidator trial_token_validator_; 302 TrialTokenValidator trial_token_validator_;
297 303
298 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl); 304 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl);
299 }; 305 };
300 306
301 } // namespace content 307 } // namespace content
302 308
303 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ 309 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698