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

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

Issue 2872563002: Use OnceCallback on Mojo interfaces in //device/gamepad (Closed)
Patch Set: rebase 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 | « no previous file | 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"
(...skipping 14 matching lines...) Expand all
25 ~GamepadMonitor() override; 25 ~GamepadMonitor() override;
26 26
27 static void Create(const service_manager::BindSourceInfo& source_info, 27 static void Create(const service_manager::BindSourceInfo& source_info,
28 mojom::GamepadMonitorRequest request); 28 mojom::GamepadMonitorRequest request);
29 29
30 // GamepadConsumer implementation. 30 // GamepadConsumer implementation.
31 void OnGamepadConnected(unsigned index, const Gamepad& gamepad) override; 31 void OnGamepadConnected(unsigned index, const Gamepad& gamepad) override;
32 void OnGamepadDisconnected(unsigned index, const Gamepad& gamepad) override; 32 void OnGamepadDisconnected(unsigned index, const Gamepad& gamepad) override;
33 33
34 // mojom::GamepadMonitor implementation. 34 // mojom::GamepadMonitor implementation.
35 void GamepadStartPolling( 35 void GamepadStartPolling(GamepadStartPollingCallback callback) override;
36 const GamepadStartPollingCallback& callback) override; 36 void GamepadStopPolling(GamepadStopPollingCallback callback) override;
37 void GamepadStopPolling(const GamepadStopPollingCallback& callback) override;
38 void SetObserver(mojom::GamepadObserverPtr gamepad_observer) override; 37 void SetObserver(mojom::GamepadObserverPtr gamepad_observer) override;
39 38
40 private: 39 private:
41 mojom::GamepadObserverPtr gamepad_observer_; 40 mojom::GamepadObserverPtr gamepad_observer_;
42 bool is_started_; 41 bool is_started_;
43 42
44 DISALLOW_COPY_AND_ASSIGN(GamepadMonitor); 43 DISALLOW_COPY_AND_ASSIGN(GamepadMonitor);
45 }; 44 };
46 45
47 } // namespace device 46 } // namespace device
48 47
49 #endif // DEVICE_GAMEPAD_GAMEPAD_MONITOR_H_ 48 #endif // DEVICE_GAMEPAD_GAMEPAD_MONITOR_H_
OLDNEW
« no previous file with comments | « no previous file | device/gamepad/gamepad_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698