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

Side by Side Diff: content/public/renderer/renderer_gamepad_provider.h

Issue 2808093006: [Device Service] Move Gamepad Blink headers to be part of the Gamepad client library (Closed)
Patch Set: rebase and address comments Created 3 years, 8 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
« no previous file with comments | « content/common/DEPS ('k') | content/renderer/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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_PUBLIC_RENDERER_RENDERER_GAMEPAD_PROVIDER_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDERER_GAMEPAD_PROVIDER_H_
6 #define CONTENT_PUBLIC_RENDERER_RENDERER_GAMEPAD_PROVIDER_H_ 6 #define CONTENT_PUBLIC_RENDERER_RENDERER_GAMEPAD_PROVIDER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/public/renderer/platform_event_observer.h" 9 #include "content/public/renderer/platform_event_observer.h"
10 10
11 namespace blink { 11 namespace blink {
12 class WebGamepadListener; 12 class WebGamepadListener;
13 class WebGamepads; 13 }
14
15 namespace device {
16 class Gamepads;
14 } 17 }
15 18
16 namespace content { 19 namespace content {
17 20
18 // Provides gamepad data and events for blink. 21 // Provides gamepad data and events for blink.
19 class RendererGamepadProvider 22 class RendererGamepadProvider
20 : public PlatformEventObserver<blink::WebGamepadListener> { 23 : public PlatformEventObserver<blink::WebGamepadListener> {
21 public: 24 public:
22 explicit RendererGamepadProvider(RenderThread* thread) 25 explicit RendererGamepadProvider(RenderThread* thread)
23 : PlatformEventObserver<blink::WebGamepadListener>(thread) { } 26 : PlatformEventObserver<blink::WebGamepadListener>(thread) { }
24 27
25 ~RendererGamepadProvider() override {} 28 ~RendererGamepadProvider() override {}
26 29
27 // Provides latest snapshot of gamepads. 30 // Provides latest snapshot of gamepads.
28 virtual void SampleGamepads(blink::WebGamepads& gamepads) = 0; 31 virtual void SampleGamepads(device::Gamepads& gamepads) = 0;
29 32
30 protected: 33 protected:
31 DISALLOW_COPY_AND_ASSIGN(RendererGamepadProvider); 34 DISALLOW_COPY_AND_ASSIGN(RendererGamepadProvider);
32 }; 35 };
33 36
34 } // namespace content 37 } // namespace content
35 38
36 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_GAMEPAD_PROVIDER_H_ 39 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_GAMEPAD_PROVIDER_H_
OLDNEW
« no previous file with comments | « content/common/DEPS ('k') | content/renderer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698