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 package org.chromium.content.browser.input; | 5 package org.chromium.device.gamepad; |
6 | 6 |
7 import android.os.SystemClock; | 7 import android.os.SystemClock; |
8 import android.view.InputDevice; | 8 import android.view.InputDevice; |
9 import android.view.InputDevice.MotionRange; | 9 import android.view.InputDevice.MotionRange; |
10 import android.view.KeyEvent; | 10 import android.view.KeyEvent; |
11 import android.view.MotionEvent; | 11 import android.view.MotionEvent; |
12 | 12 |
13 import org.chromium.base.VisibleForTesting; | 13 import org.chromium.base.VisibleForTesting; |
14 | 14 |
15 import java.util.Arrays; | 15 import java.util.Arrays; |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 if (!GamepadList.isGamepadEvent(event)) return false; | 174 if (!GamepadList.isGamepadEvent(event)) return false; |
175 // Update axes values. | 175 // Update axes values. |
176 for (int i = 0; i < mAxes.length; i++) { | 176 for (int i = 0; i < mAxes.length; i++) { |
177 int axis = mAxes[i]; | 177 int axis = mAxes[i]; |
178 mRawAxes[axis] = event.getAxisValue(axis); | 178 mRawAxes[axis] = event.getAxisValue(axis); |
179 } | 179 } |
180 mTimestamp = event.getEventTime(); | 180 mTimestamp = event.getEventTime(); |
181 return true; | 181 return true; |
182 } | 182 } |
183 } | 183 } |
OLD | NEW |