1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_RENDERER_RENDERER_GAMEPAD_PROVIDER_H_
6 #define CONTENT_PUBLIC_RENDERER_RENDERER_GAMEPAD_PROVIDER_H_
8 #include "content/public/renderer/platform_event_observer.h"
11 class WebGamepadListener
;
17 // Provides gamepad data and events for blink.
18 class RendererGamepadProvider
19 : public PlatformEventObserver
<blink::WebGamepadListener
> {
21 explicit RendererGamepadProvider(RenderThread
* thread
)
22 : PlatformEventObserver
<blink::WebGamepadListener
>(thread
) { }
24 ~RendererGamepadProvider() override
{}
26 // Provides latest snapshot of gamepads.
27 virtual void SampleGamepads(blink::WebGamepads
& gamepads
) = 0;
30 DISALLOW_COPY_AND_ASSIGN(RendererGamepadProvider
);
33 } // namespace content