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 #include "device/gamepad/gamepad_provider.h" | 5 #include "device/gamepad/gamepad_provider.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <string.h> | 8 #include <string.h> |
9 #include <cmath> | 9 #include <cmath> |
10 #include <utility> | 10 #include <utility> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/location.h" | 14 #include "base/location.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/message_loop/message_loop.h" |
16 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
17 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" | 18 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" |
18 #include "base/threading/thread.h" | 19 #include "base/threading/thread.h" |
19 #include "base/threading/thread_restrictions.h" | 20 #include "base/threading/thread_restrictions.h" |
20 #include "base/threading/thread_task_runner_handle.h" | 21 #include "base/threading/thread_task_runner_handle.h" |
21 #include "build/build_config.h" | 22 #include "build/build_config.h" |
22 #include "device/gamepad/gamepad_data_fetcher.h" | 23 #include "device/gamepad/gamepad_data_fetcher.h" |
23 #include "device/gamepad/gamepad_data_fetcher_manager.h" | 24 #include "device/gamepad/gamepad_data_fetcher_manager.h" |
24 #include "device/gamepad/gamepad_user_gesture.h" | 25 #include "device/gamepad/gamepad_user_gesture.h" |
25 #include "mojo/public/cpp/system/platform_handle.h" | 26 #include "mojo/public/cpp/system/platform_handle.h" |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 ever_had_user_gesture_ = true; | 321 ever_had_user_gesture_ = true; |
321 for (size_t i = 0; i < user_gesture_observers_.size(); i++) { | 322 for (size_t i = 0; i < user_gesture_observers_.size(); i++) { |
322 user_gesture_observers_[i].task_runner->PostTask( | 323 user_gesture_observers_[i].task_runner->PostTask( |
323 FROM_HERE, user_gesture_observers_[i].closure); | 324 FROM_HERE, user_gesture_observers_[i].closure); |
324 } | 325 } |
325 user_gesture_observers_.clear(); | 326 user_gesture_observers_.clear(); |
326 } | 327 } |
327 } | 328 } |
328 | 329 |
329 } // namespace device | 330 } // namespace device |
OLD | NEW |