OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "device/gamepad/gamepad_monitor.h" | 5 #include "device/gamepad/gamepad_monitor.h" |
6 | 6 |
| 7 #include "base/memory/ptr_util.h" |
7 #include "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
8 #include "device/gamepad/gamepad_service.h" | 9 #include "device/gamepad/gamepad_service.h" |
9 #include "device/gamepad/gamepad_shared_buffer.h" | 10 #include "device/gamepad/gamepad_shared_buffer.h" |
10 #include "mojo/public/cpp/bindings/strong_binding.h" | 11 #include "mojo/public/cpp/bindings/strong_binding.h" |
11 | 12 |
12 namespace device { | 13 namespace device { |
13 | 14 |
14 GamepadMonitor::GamepadMonitor() : is_started_(false) {} | 15 GamepadMonitor::GamepadMonitor() : is_started_(false) {} |
15 | 16 |
16 GamepadMonitor::~GamepadMonitor() { | 17 GamepadMonitor::~GamepadMonitor() { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 54 |
54 GamepadService::GetInstance()->ConsumerBecameInactive(this); | 55 GamepadService::GetInstance()->ConsumerBecameInactive(this); |
55 callback.Run(); | 56 callback.Run(); |
56 } | 57 } |
57 | 58 |
58 void GamepadMonitor::SetObserver(mojom::GamepadObserverPtr gamepad_observer) { | 59 void GamepadMonitor::SetObserver(mojom::GamepadObserverPtr gamepad_observer) { |
59 gamepad_observer_ = std::move(gamepad_observer); | 60 gamepad_observer_ = std::move(gamepad_observer); |
60 } | 61 } |
61 | 62 |
62 } // namespace device | 63 } // namespace device |
OLD | NEW |