| 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 <stddef.h> |
| 6 |
| 5 #include <cmath> | 7 #include <cmath> |
| 6 #include <set> | 8 #include <set> |
| 7 #include <vector> | 9 #include <vector> |
| 8 | 10 |
| 9 #include "base/bind.h" | 11 #include "base/bind.h" |
| 10 #include "base/location.h" | 12 #include "base/location.h" |
| 11 #include "base/logging.h" | 13 #include "base/logging.h" |
| 12 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
| 13 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" | 15 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" |
| 14 #include "base/thread_task_runner_handle.h" | 16 #include "base/thread_task_runner_handle.h" |
| 15 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
| 16 #include "base/threading/thread_restrictions.h" | 18 #include "base/threading/thread_restrictions.h" |
| 19 #include "build/build_config.h" |
| 17 #include "content/browser/gamepad/gamepad_data_fetcher.h" | 20 #include "content/browser/gamepad/gamepad_data_fetcher.h" |
| 18 #include "content/browser/gamepad/gamepad_platform_data_fetcher.h" | 21 #include "content/browser/gamepad/gamepad_platform_data_fetcher.h" |
| 19 #include "content/browser/gamepad/gamepad_provider.h" | 22 #include "content/browser/gamepad/gamepad_provider.h" |
| 20 #include "content/browser/gamepad/gamepad_service.h" | 23 #include "content/browser/gamepad/gamepad_service.h" |
| 21 #include "content/common/gamepad_hardware_buffer.h" | 24 #include "content/common/gamepad_hardware_buffer.h" |
| 22 #include "content/common/gamepad_messages.h" | 25 #include "content/common/gamepad_messages.h" |
| 23 #include "content/common/gamepad_user_gesture.h" | 26 #include "content/common/gamepad_user_gesture.h" |
| 24 #include "content/public/browser/browser_thread.h" | 27 #include "content/public/browser/browser_thread.h" |
| 25 | 28 |
| 26 using blink::WebGamepad; | 29 using blink::WebGamepad; |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 } | 320 } |
| 318 if (!had_gesture_before && ever_had_user_gesture_) { | 321 if (!had_gesture_before && ever_had_user_gesture_) { |
| 319 // Initialize pad_states_ for the first time. | 322 // Initialize pad_states_ for the first time. |
| 320 for (size_t i = 0; i < WebGamepads::itemsLengthCap; ++i) { | 323 for (size_t i = 0; i < WebGamepads::itemsLengthCap; ++i) { |
| 321 pad_states_.get()[i].SetPad(pads.items[i]); | 324 pad_states_.get()[i].SetPad(pads.items[i]); |
| 322 } | 325 } |
| 323 } | 326 } |
| 324 } | 327 } |
| 325 | 328 |
| 326 } // namespace content | 329 } // namespace content |
| OLD | NEW |