From 41dada5c1a8036e5a335b209dfe9838503cf593f Mon Sep 17 00:00:00 2001 From: "skhatri@nvidia.com" Date: Mon, 2 Jun 2014 12:23:12 +0000 Subject: Gamepad API support for chrome on android This change adds code to get gamepad data from java objects and provide these updates to the GamepadProvider which then writes to GamepadHardwareBuffer which in turn is read by SharedMemoryReader and later returned by JS to the web page. This also adds new framework classes/methods required for Gamepad API support. Frameworks changes are responsible for : - Identifying gamepad devices and their capabilities. - Managing connected gamepad devices - Map the connected gamepad devices to standard Gamepad format. - Keeping gamepads axes/buttons data up-to-date and returning it to native whenever requested. In android we cannot get gamepad data directly from sources, so framework is modified to capture gamepad key and motion events and extract gamepad data from these events. * Class GamepadPlatformDataFetcherAndroid : Android specific implementation of gamepad data fetcher. - Responsible for communication with java class and accessing gamepad data. - It adds methods for communication with singleton java GamepadList class to get gamepads data. * Class ContentViewCore : Manages gamepad list and notifies of new key/motion event for gamepads. * Class GamepadList : A new class to manage connected gamepad devices * Class GamepadDevice : A new class to manage information related to each gamepad device. * Class GamepadMappings : This class is responsible for mapping of known gamepads to the standard gamepad. This change enables gamepad API by default. Adds support for parsing float array return type in JNI generator. NVIDIA Shield and XBox360 gamepads are mapped to the standard gamepad BUG=330094 TEST=http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad-tester/tester.html R=tsepez@chromium.org R=darin@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270620 Review URL: https://codereview.chromium.org/133943002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274212 0039d316-1c4b-4281-b951-d872f2087c98 --- android_webview/Android.mk | 2 ++ android_webview/android_webview.gyp | 1 + 2 files changed, 3 insertions(+) (limited to 'android_webview') diff --git a/android_webview/Android.mk b/android_webview/Android.mk index dd9e13b..525fb84 100644 --- a/android_webview/Android.mk +++ b/android_webview/Android.mk @@ -61,6 +61,8 @@ $(call intermediates-dir-for,GYP,shared,,,$(TARGET_2ND_ARCH))/templates/org/chro $(call intermediates-dir-for,GYP,shared,,,$(TARGET_2ND_ARCH))/templates/org/chromium/content/browser/GestureEventType.java \ $(call intermediates-dir-for,GYP,shared,,,$(TARGET_2ND_ARCH))/templates/org/chromium/content/browser/PageTransitionTypes.java \ $(call intermediates-dir-for,GYP,shared,,,$(TARGET_2ND_ARCH))/templates/org/chromium/content/browser/SpeechRecognitionError.java \ +$(call intermediates-dir-for,GYP,shared,,,$(TARGET_2ND_ARCH))/templates/org/chromium/content/browser/input/CanonicalAxisIndex.java \ +$(call intermediates-dir-for,GYP,shared,,,$(TARGET_2ND_ARCH))/templates/org/chromium/content/browser/input/CanonicalButtonIndex.java \ $(call intermediates-dir-for,GYP,shared,,,$(TARGET_2ND_ARCH))/templates/org/chromium/content/browser/input/PopupItemType.java \ $(call intermediates-dir-for,GYP,shared,,,$(TARGET_2ND_ARCH))/templates/org/chromium/content/common/ResultCodes.java \ $(call intermediates-dir-for,GYP,shared,,,$(TARGET_2ND_ARCH))/templates/org/chromium/content/common/ScreenOrientationValues.java \ diff --git a/android_webview/android_webview.gyp b/android_webview/android_webview.gyp index d8fd181..2c64cf8 100644 --- a/android_webview/android_webview.gyp +++ b/android_webview/android_webview.gyp @@ -26,6 +26,7 @@ 'dependencies': [ '../base/base.gyp:base_java_application_state', '../base/base.gyp:base_java_memory_pressure_level_list', + '../content/content.gyp:content_gamepad_mapping', '../content/content.gyp:gesture_event_type_java', '../content/content.gyp:page_transition_types_java', '../content/content.gyp:popup_item_type_java', -- cgit v1.1