Add launcherPage.show() extension API.
[chromium-blink-merge.git] / content / public / renderer / renderer_gamepad_provider.h
blob6899948bb2cd192f8d3920b9a9bb37dad05059a2
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"
10 namespace blink {
11 class WebGamepadListener;
12 class WebGamepads;
15 namespace content {
17 // Provides gamepad data and events for blink.
18 class RendererGamepadProvider
19 : public PlatformEventObserver<blink::WebGamepadListener> {
20 public:
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;
29 protected:
30 DISALLOW_COPY_AND_ASSIGN(RendererGamepadProvider);
33 } // namespace content
35 #endif