| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/gamepad/gamepad_platform_data_fetcher_android.h" | 5 #include "content/browser/gamepad/gamepad_platform_data_fetcher_android.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
| 9 #include "base/android/jni_string.h" | 11 #include "base/android/jni_string.h" |
| 10 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
| 11 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
| 13 #include "base/trace_event/trace_event.h" | 15 #include "base/trace_event/trace_event.h" |
| 14 | 16 |
| 15 #include "jni/GamepadList_jni.h" | 17 #include "jni/GamepadList_jni.h" |
| 16 | 18 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 static_cast<int>(WebGamepad::buttonsLengthCap)); | 142 static_cast<int>(WebGamepad::buttonsLengthCap)); |
| 141 | 143 |
| 142 // Copy buttons state to the WebGamepad buttons[]. | 144 // Copy buttons state to the WebGamepad buttons[]. |
| 143 for (unsigned int j = 0; j < pad.buttonsLength; j++) { | 145 for (unsigned int j = 0; j < pad.buttonsLength; j++) { |
| 144 pad.buttons[j].pressed = buttons[j]; | 146 pad.buttons[j].pressed = buttons[j]; |
| 145 pad.buttons[j].value = buttons[j]; | 147 pad.buttons[j].value = buttons[j]; |
| 146 } | 148 } |
| 147 } | 149 } |
| 148 | 150 |
| 149 } // namespace content | 151 } // namespace content |
| OLD | NEW |