| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |