Chromium Code Reviews| Index: device/gamepad/android/java/src/org/chromium/device/gamepad/GamepadList.java |
| diff --git a/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java b/device/gamepad/android/java/src/org/chromium/device/gamepad/GamepadList.java |
| similarity index 96% |
| rename from content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java |
| rename to device/gamepad/android/java/src/org/chromium/device/gamepad/GamepadList.java |
| index 6f75214f69e0901dd265e46c2d8f2b38fe877f47..46636395ed31bd1d251c763ac92a6efd679ea84b 100644 |
| --- a/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java |
| +++ b/device/gamepad/android/java/src/org/chromium/device/gamepad/GamepadList.java |
| @@ -2,7 +2,7 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -package org.chromium.content.browser.input; |
| +package org.chromium.device.gamepad; |
| import android.annotation.SuppressLint; |
| import android.content.Context; |
| @@ -16,7 +16,7 @@ import android.view.MotionEvent; |
| import org.chromium.base.ThreadUtils; |
| import org.chromium.base.annotations.CalledByNative; |
| import org.chromium.base.annotations.JNINamespace; |
| -import org.chromium.content.browser.ContentView; |
| +// import org.chromium.content.browser.ContentView; |
|
scottmg
2016/06/23 17:27:19
Remove.
|
| /** |
| * Class to manage connected gamepad devices list. |
| @@ -24,7 +24,7 @@ import org.chromium.content.browser.ContentView; |
| * It is a Java counterpart of GamepadPlatformDataFetcherAndroid and feeds Gamepad API with input |
| * data. |
| */ |
| -@JNINamespace("content") |
| +@JNINamespace("device") |
| public class GamepadList { |
| private static final int MAX_GAMEPADS = 4; |
| @@ -238,8 +238,8 @@ public class GamepadList { |
| private static boolean isGamepadDevice(InputDevice inputDevice) { |
| if (inputDevice == null) return false; |
| - return ((inputDevice.getSources() |
| - & InputDevice.SOURCE_JOYSTICK) == InputDevice.SOURCE_JOYSTICK); |
| + return ((inputDevice.getSources() & InputDevice.SOURCE_JOYSTICK) |
| + == InputDevice.SOURCE_JOYSTICK); |
| } |
| private GamepadDevice getGamepadForEvent(InputEvent event) { |
| @@ -266,8 +266,8 @@ public class GamepadList { |
| public static boolean isGamepadEvent(KeyEvent event) { |
| int keyCode = event.getKeyCode(); |
| switch (keyCode) { |
| - // Specific handling for dpad keys is required because |
| - // KeyEvent.isGamepadButton doesn't consider dpad keys. |
| + // Specific handling for dpad keys is required because |
| + // KeyEvent.isGamepadButton doesn't consider dpad keys. |
| case KeyEvent.KEYCODE_DPAD_UP: |
| case KeyEvent.KEYCODE_DPAD_DOWN: |
| case KeyEvent.KEYCODE_DPAD_LEFT: |
| @@ -323,5 +323,4 @@ public class GamepadList { |
| private static class LazyHolder { |
| private static final GamepadList INSTANCE = new GamepadList(); |
| } |
| - |
| } |