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

Side by Side Diff: device/gamepad/gamepad_monitor.h

Issue 2851173004: Eliminate bind callback that doesn't take a BindSourceInfo parameter. (Closed)
Patch Set: . Created 3 years, 7 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/bluetooth/test/fake_bluetooth.cc ('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 service_manager {
15 struct BindSourceInfo;
16 }
17
14 namespace device { 18 namespace device {
15 19
16 class DEVICE_GAMEPAD_EXPORT GamepadMonitor 20 class DEVICE_GAMEPAD_EXPORT GamepadMonitor
17 : public GamepadConsumer, 21 : public GamepadConsumer,
18 NON_EXPORTED_BASE(public mojom::GamepadMonitor) { 22 NON_EXPORTED_BASE(public mojom::GamepadMonitor) {
19 public: 23 public:
20 GamepadMonitor(); 24 GamepadMonitor();
21 ~GamepadMonitor() override; 25 ~GamepadMonitor() override;
22 26
23 static void Create(mojom::GamepadMonitorRequest request); 27 static void Create(const service_manager::BindSourceInfo& source_info,
28 mojom::GamepadMonitorRequest request);
24 29
25 // GamepadConsumer implementation. 30 // GamepadConsumer implementation.
26 void OnGamepadConnected(unsigned index, const Gamepad& gamepad) override; 31 void OnGamepadConnected(unsigned index, const Gamepad& gamepad) override;
27 void OnGamepadDisconnected(unsigned index, const Gamepad& gamepad) override; 32 void OnGamepadDisconnected(unsigned index, const Gamepad& gamepad) override;
28 33
29 // mojom::GamepadMonitor implementation. 34 // mojom::GamepadMonitor implementation.
30 void GamepadStartPolling( 35 void GamepadStartPolling(
31 const GamepadStartPollingCallback& callback) override; 36 const GamepadStartPollingCallback& callback) override;
32 void GamepadStopPolling(const GamepadStopPollingCallback& callback) override; 37 void GamepadStopPolling(const GamepadStopPollingCallback& callback) override;
33 void SetObserver(mojom::GamepadObserverPtr gamepad_observer) override; 38 void SetObserver(mojom::GamepadObserverPtr gamepad_observer) override;
34 39
35 private: 40 private:
36 mojom::GamepadObserverPtr gamepad_observer_; 41 mojom::GamepadObserverPtr gamepad_observer_;
37 bool is_started_; 42 bool is_started_;
38 43
39 DISALLOW_COPY_AND_ASSIGN(GamepadMonitor); 44 DISALLOW_COPY_AND_ASSIGN(GamepadMonitor);
40 }; 45 };
41 46
42 } // namespace device 47 } // namespace device
43 48
44 #endif // DEVICE_GAMEPAD_GAMEPAD_MONITOR_H_ 49 #endif // DEVICE_GAMEPAD_GAMEPAD_MONITOR_H_
OLDNEW
« no previous file with comments | « device/bluetooth/test/fake_bluetooth.cc ('k') | device/gamepad/gamepad_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698