Index: content/renderer/renderer_webkitplatformsupport_impl.h |
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.h b/content/renderer/renderer_webkitplatformsupport_impl.h |
index 5419594e9f5b12795200dd920fb11fa8606d8552..209da825f3357dd5a7321d1b97d83eb230b7e0e9 100644 |
--- a/content/renderer/renderer_webkitplatformsupport_impl.h |
+++ b/content/renderer/renderer_webkitplatformsupport_impl.h |
@@ -6,7 +6,6 @@ |
#define CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ |
#include "base/compiler_specific.h" |
-#include "base/id_map.h" |
#include "base/memory/scoped_ptr.h" |
#include "content/child/blink_platform_impl.h" |
#include "content/common/content_export.h" |
@@ -40,10 +39,10 @@ class BatteryStatusDispatcher; |
class DeviceLightEventPump; |
class DeviceMotionEventPump; |
class DeviceOrientationEventPump; |
-class PlatformEventObserverBase; |
class QuotaMessageFilter; |
class RendererClipboardClient; |
class RenderView; |
+class RendererGamepadProvider; |
class ThreadSafeSender; |
class WebClipboardImpl; |
class WebDatabaseObserverImpl; |
@@ -147,13 +146,9 @@ class CONTENT_EXPORT RendererWebKitPlatformSupportImpl |
virtual void vibrate(unsigned int milliseconds); |
virtual void cancelVibration(); |
- // Set the PlatformEventObserverBase in |platform_event_observers_| associated |
- // with |type| to |observer|. If there was already an observer associated to |
- // the given |type|, it will be replaced. |
- // Note that |observer| will be owned by this object after the call. |
- void SetPlatformEventObserverForTesting( |
- blink::WebPlatformEventType type, |
- scoped_ptr<PlatformEventObserverBase> observer); |
+ void set_gamepad_provider(RendererGamepadProvider* provider) { |
+ gamepad_provider_ = provider; |
+ } |
// Disables the WebSandboxSupport implementation for testing. |
// Tests that do not set up a full sandbox environment should call |
@@ -175,7 +170,7 @@ class CONTENT_EXPORT RendererWebKitPlatformSupportImpl |
const blink::WebDeviceOrientationData& data); |
// Notifies blink::WebBatteryStatusListener that battery status has changed. |
- void MockBatteryStatusChangedForTesting( |
+ static void MockBatteryStatusChangedForTesting( |
const blink::WebBatteryStatus& status); |
WebDatabaseObserverImpl* web_database_observer_impl() { |
@@ -185,14 +180,14 @@ class CONTENT_EXPORT RendererWebKitPlatformSupportImpl |
private: |
bool CheckPreparsedJsCachingEnabled() const; |
- // Factory that takes a type and return PlatformEventObserverBase that matches |
- // it. |
- static PlatformEventObserverBase* CreatePlatformEventObserverFromType( |
- blink::WebPlatformEventType type); |
+ // Implement those methods internally so startListening() and stopListening() |
+ // are being used and Blink can change its interface. |
+ void SetDeviceMotionListener(blink::WebDeviceMotionListener*); |
+ void SetDeviceOrientationListener(blink::WebDeviceOrientationListener*); |
+ void SetDeviceLightListener(blink::WebDeviceLightListener*); |
+ void SetBatteryStatusListener(blink::WebBatteryStatusListener*); |
+ void SetGamepadListener(blink::WebGamepadListener*); |
- // Use the data previously set via SetMockDevice...DataForTesting() and send |
- // them to the registered listener. |
- void SendFakeDeviceEventDataForTesting(blink::WebPlatformEventType type); |
scoped_ptr<RendererClipboardClient> clipboard_client_; |
scoped_ptr<WebClipboardImpl> clipboard_; |
@@ -238,7 +233,7 @@ class CONTENT_EXPORT RendererWebKitPlatformSupportImpl |
scoped_ptr<BatteryStatusDispatcher> battery_status_dispatcher_; |
- IDMap<PlatformEventObserverBase, IDMapOwnPointer> platform_event_observers_; |
+ RendererGamepadProvider* gamepad_provider_; |
DISALLOW_COPY_AND_ASSIGN(RendererWebKitPlatformSupportImpl); |
}; |