| 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 "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
| 9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
| 10 #include "base/debug/trace_event.h" | |
| 11 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| 12 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "base/trace_event/trace_event.h" |
| 14 | 14 |
| 15 #include "jni/GamepadList_jni.h" | 15 #include "jni/GamepadList_jni.h" |
| 16 | 16 |
| 17 #include "third_party/WebKit/public/platform/WebGamepads.h" | 17 #include "third_party/WebKit/public/platform/WebGamepads.h" |
| 18 | 18 |
| 19 using base::android::AttachCurrentThread; | 19 using base::android::AttachCurrentThread; |
| 20 using base::android::CheckException; | 20 using base::android::CheckException; |
| 21 using base::android::ClearException; | 21 using base::android::ClearException; |
| 22 using base::android::ConvertJavaStringToUTF8; | 22 using base::android::ConvertJavaStringToUTF8; |
| 23 using base::android::ScopedJavaLocalRef; | 23 using base::android::ScopedJavaLocalRef; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 static_cast<int>(WebGamepad::buttonsLengthCap)); | 140 static_cast<int>(WebGamepad::buttonsLengthCap)); |
| 141 | 141 |
| 142 // Copy buttons state to the WebGamepad buttons[]. | 142 // Copy buttons state to the WebGamepad buttons[]. |
| 143 for (unsigned int j = 0; j < pad.buttonsLength; j++) { | 143 for (unsigned int j = 0; j < pad.buttonsLength; j++) { |
| 144 pad.buttons[j].pressed = buttons[j]; | 144 pad.buttons[j].pressed = buttons[j]; |
| 145 pad.buttons[j].value = buttons[j]; | 145 pad.buttons[j].value = buttons[j]; |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 | 148 |
| 149 } // namespace content | 149 } // namespace content |
| OLD | NEW |