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

Side by Side Diff: device/gamepad/gamepad_monitor.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 | « device/gamepad/gamepad_consumer.h ('k') | device/gamepad/gamepad_monitor.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 DEVICE_GAMEPAD_GAMEPAD_MONITOR_H_ 5 #ifndef DEVICE_GAMEPAD_GAMEPAD_MONITOR_H_
6 #define DEVICE_GAMEPAD_GAMEPAD_MONITOR_H_ 6 #define DEVICE_GAMEPAD_GAMEPAD_MONITOR_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "device/gamepad/gamepad_consumer.h" 10 #include "device/gamepad/gamepad_consumer.h"
11 #include "device/gamepad/gamepad_export.h" 11 #include "device/gamepad/gamepad_export.h"
12 #include "device/gamepad/public/interfaces/gamepad.mojom.h" 12 #include "device/gamepad/public/interfaces/gamepad.mojom.h"
13 13
14 namespace device { 14 namespace device {
15 15
16 class DEVICE_GAMEPAD_EXPORT GamepadMonitor 16 class DEVICE_GAMEPAD_EXPORT GamepadMonitor
17 : public GamepadConsumer, 17 : public GamepadConsumer,
18 NON_EXPORTED_BASE(public mojom::GamepadMonitor) { 18 NON_EXPORTED_BASE(public mojom::GamepadMonitor) {
19 public: 19 public:
20 GamepadMonitor(); 20 GamepadMonitor();
21 ~GamepadMonitor() override; 21 ~GamepadMonitor() override;
22 22
23 static void Create(mojom::GamepadMonitorRequest request); 23 static void Create(mojom::GamepadMonitorRequest request);
24 24
25 // GamepadConsumer implementation. 25 // GamepadConsumer implementation.
26 void OnGamepadConnected(unsigned index, 26 void OnGamepadConnected(unsigned index, const Gamepad& gamepad) override;
27 const blink::WebGamepad& gamepad) override; 27 void OnGamepadDisconnected(unsigned index, const Gamepad& gamepad) override;
28 void OnGamepadDisconnected(unsigned index,
29 const blink::WebGamepad& gamepad) override;
30 28
31 // mojom::GamepadMonitor implementation. 29 // mojom::GamepadMonitor implementation.
32 void GamepadStartPolling( 30 void GamepadStartPolling(
33 const GamepadStartPollingCallback& callback) override; 31 const GamepadStartPollingCallback& callback) override;
34 void GamepadStopPolling(const GamepadStopPollingCallback& callback) override; 32 void GamepadStopPolling(const GamepadStopPollingCallback& callback) override;
35 void SetObserver(mojom::GamepadObserverPtr gamepad_observer) override; 33 void SetObserver(mojom::GamepadObserverPtr gamepad_observer) override;
36 34
37 private: 35 private:
38 mojom::GamepadObserverPtr gamepad_observer_; 36 mojom::GamepadObserverPtr gamepad_observer_;
39 bool is_started_; 37 bool is_started_;
40 38
41 DISALLOW_COPY_AND_ASSIGN(GamepadMonitor); 39 DISALLOW_COPY_AND_ASSIGN(GamepadMonitor);
42 }; 40 };
43 41
44 } // namespace device 42 } // namespace device
45 43
46 #endif // DEVICE_GAMEPAD_GAMEPAD_MONITOR_H_ 44 #endif // DEVICE_GAMEPAD_GAMEPAD_MONITOR_H_
OLDNEW
« no previous file with comments | « device/gamepad/gamepad_consumer.h ('k') | device/gamepad/gamepad_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698