Chromium Code Reviews| Index: content/public/renderer/renderer_gamepad_provider.h |
| diff --git a/content/public/renderer/renderer_gamepad_provider.h b/content/public/renderer/renderer_gamepad_provider.h |
| index ba6ec9fae98fbb7b5dedc4ccd52420f8751d694a..1d802502ebbcffc83beb6c16020849d24ba36c12 100644 |
| --- a/content/public/renderer/renderer_gamepad_provider.h |
| +++ b/content/public/renderer/renderer_gamepad_provider.h |
| @@ -2,8 +2,10 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CONTENT_GAMEPAD_RENDERER_PROVIDER_H_ |
| -#define CONTENT_GAMEPAD_RENDERER_PROVIDER_H_ |
| +#ifndef CONTENT_PUBLIC_RENDERER_RENDERER_GAMEPAD_PROVIDER_H_ |
| +#define CONTENT_PUBLIC_RENDERER_RENDERER_GAMEPAD_PROVIDER_H_ |
| + |
| +#include "content/public/renderer/platform_event_observer.h" |
| namespace blink { |
| class WebGamepadListener; |
| @@ -13,16 +15,21 @@ class WebGamepads; |
| namespace content { |
| // Provides gamepad data and events for blink. |
| -class RendererGamepadProvider { |
| +class RendererGamepadProvider |
| + : public PlatformEventObserver<blink::WebGamepadListener> { |
| public: |
| + explicit RendererGamepadProvider(RenderThread* thread) |
| + : PlatformEventObserver<blink::WebGamepadListener>(thread) { } |
| // Provides latest snapshot of gamepads. |
| virtual void SampleGamepads(blink::WebGamepads& gamepads) = 0; |
| - // Registers listener for be notified of events. |
| - virtual void SetGamepadListener(blink::WebGamepadListener* listener) = 0; |
| + // This PlatformEventObserver implementation do not handle that. |
|
scottmg
2014/08/05 21:09:18
nit; "do not handle that" -> "does not handle this
mlamouri (slow - plz ping)
2014/08/05 21:32:36
Done.
|
| + virtual void SendFakeDataForTesting(void* data) OVERRIDE { } |
| protected: |
| virtual ~RendererGamepadProvider() {} |
| + |
| + DISALLOW_COPY_AND_ASSIGN(RendererGamepadProvider); |
| }; |
| } // namespace content |