• skhatri@nvidia.com's avatar
    Gamepad API support for chrome on android · 41dada5c
    skhatri@nvidia.com authored
    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
    41dada5c
content_browser.gypi 86.8 KB