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

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

Issue 298263002: Battery Status API: add testing support for LayoutTests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 6 years, 6 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_WEBKITPLATFORMSUPPORT_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_
6 #define CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ 6 #define CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/child/blink_platform_impl.h" 10 #include "content/child/blink_platform_impl.h"
(...skipping 10 matching lines...) Expand all
21 21
22 namespace cc { 22 namespace cc {
23 class ContextProvider; 23 class ContextProvider;
24 } 24 }
25 25
26 namespace IPC { 26 namespace IPC {
27 class SyncMessageFilter; 27 class SyncMessageFilter;
28 } 28 }
29 29
30 namespace blink { 30 namespace blink {
31 class WebBatteryStatus;
31 class WebDeviceMotionData; 32 class WebDeviceMotionData;
32 class WebDeviceOrientationData; 33 class WebDeviceOrientationData;
33 class WebGraphicsContext3DProvider; 34 class WebGraphicsContext3DProvider;
34 class WebScreenOrientationListener; 35 class WebScreenOrientationListener;
35 } 36 }
36 37
37 namespace content { 38 namespace content {
38 class BatteryStatusDispatcher; 39 class BatteryStatusDispatcher;
39 class DeviceMotionEventPump; 40 class DeviceMotionEventPump;
40 class DeviceOrientationEventPump; 41 class DeviceOrientationEventPump;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // Set WebDeviceOrientationData to return when setDeviceOrientationListener 179 // Set WebDeviceOrientationData to return when setDeviceOrientationListener
179 // is invoked. 180 // is invoked.
180 static void SetMockDeviceOrientationDataForTesting( 181 static void SetMockDeviceOrientationDataForTesting(
181 const blink::WebDeviceOrientationData& data); 182 const blink::WebDeviceOrientationData& data);
182 // Forces the screen orientation for testing purposes. 183 // Forces the screen orientation for testing purposes.
183 static void SetMockScreenOrientationForTesting( 184 static void SetMockScreenOrientationForTesting(
184 blink::WebScreenOrientationType); 185 blink::WebScreenOrientationType);
185 // Resets the mock screen orientation data used for testing. 186 // Resets the mock screen orientation data used for testing.
186 static void ResetMockScreenOrientationForTesting(); 187 static void ResetMockScreenOrientationForTesting();
187 188
189 // Notifies blink::WebBatteryStatusListener that battery status has changed.
190 static void MockBatteryStatusChangedForTesting(
191 const blink::WebBatteryStatus& status);
192
188 WebDatabaseObserverImpl* web_database_observer_impl() { 193 WebDatabaseObserverImpl* web_database_observer_impl() {
189 return web_database_observer_impl_.get(); 194 return web_database_observer_impl_.get();
190 } 195 }
191 196
192 private: 197 private:
193 bool CheckPreparsedJsCachingEnabled() const; 198 bool CheckPreparsedJsCachingEnabled() const;
194 199
195 scoped_ptr<RendererClipboardClient> clipboard_client_; 200 scoped_ptr<RendererClipboardClient> clipboard_client_;
196 scoped_ptr<WebClipboardImpl> clipboard_; 201 scoped_ptr<WebClipboardImpl> clipboard_;
197 202
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 scoped_ptr<blink::WebScrollbarBehavior> web_scrollbar_behavior_; 241 scoped_ptr<blink::WebScrollbarBehavior> web_scrollbar_behavior_;
237 242
238 scoped_ptr<BatteryStatusDispatcher> battery_status_dispatcher_; 243 scoped_ptr<BatteryStatusDispatcher> battery_status_dispatcher_;
239 244
240 DISALLOW_COPY_AND_ASSIGN(RendererWebKitPlatformSupportImpl); 245 DISALLOW_COPY_AND_ASSIGN(RendererWebKitPlatformSupportImpl);
241 }; 246 };
242 247
243 } // namespace content 248 } // namespace content
244 249
245 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ 250 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698