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 <cmath> | 5 #include <cmath> |
6 #include <set> | 6 #include <set> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "base/message_loop_proxy.h" | 12 #include "base/message_loop/message_loop_proxy.h" |
13 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
14 #include "base/threading/thread_restrictions.h" | 14 #include "base/threading/thread_restrictions.h" |
15 #include "content/browser/gamepad/gamepad_data_fetcher.h" | 15 #include "content/browser/gamepad/gamepad_data_fetcher.h" |
16 #include "content/browser/gamepad/gamepad_provider.h" | 16 #include "content/browser/gamepad/gamepad_provider.h" |
17 #include "content/browser/gamepad/gamepad_platform_data_fetcher.h" | 17 #include "content/browser/gamepad/gamepad_platform_data_fetcher.h" |
18 #include "content/common/gamepad_hardware_buffer.h" | 18 #include "content/common/gamepad_hardware_buffer.h" |
19 #include "content/common/gamepad_messages.h" | 19 #include "content/common/gamepad_messages.h" |
20 #include "content/common/gamepad_user_gesture.h" | 20 #include "content/common/gamepad_user_gesture.h" |
21 | 21 |
22 namespace content { | 22 namespace content { |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 if (GamepadsHaveUserGesture(SharedMemoryAsHardwareBuffer()->buffer)) { | 211 if (GamepadsHaveUserGesture(SharedMemoryAsHardwareBuffer()->buffer)) { |
212 for (size_t i = 0; i < user_gesture_observers_.size(); i++) { | 212 for (size_t i = 0; i < user_gesture_observers_.size(); i++) { |
213 user_gesture_observers_[i].message_loop->PostTask(FROM_HERE, | 213 user_gesture_observers_[i].message_loop->PostTask(FROM_HERE, |
214 user_gesture_observers_[i].closure); | 214 user_gesture_observers_[i].closure); |
215 } | 215 } |
216 user_gesture_observers_.clear(); | 216 user_gesture_observers_.clear(); |
217 } | 217 } |
218 } | 218 } |
219 | 219 |
220 } // namespace content | 220 } // namespace content |
OLD | NEW |