[WebKit] Add WebAudio Impulse Response resources as part of framework assets

This patch adds 240 Impulse response resources from external/webkit
project into framework assets to make them easily accessable by WebKit
through AssetManager.

The total size of these samples is ~250KB

Change-Id: I6c65180fb2f0236d4d795e9dba3689bb90a49d47
frameworks/base: Fix wrong condition

Should check width and height, not width and width.

Change-Id: Ie84d3605b2a7a0f4776adb876608ea92f56817c4
webkit: Multi-context HTML5 video support

- Support multiple concurrent HTML5 video playback in inline mode
- Free HTML5 video media player when loading new page
- Omit seek when resuming playback from paused state
- Enable volume control for HTML5 media elements

Change-Id: Ie6706f4feea8410ec6cd440e146efbcbb0253260
webkit: Support multi-context HTML5 audio

Browser supports pages with multiple HTML5 audio elements but only one
audio source will have audio focus at any given time.

Focus will be given to the most recently started audio. Previously
playing audio will be paused.

Change-Id: I04fad7c919a2e45249d16bc282884a2cf3f375b5
webkit: Support playing HTML5 video in fullscreen mode at once

Support entering fullscreen before video has started playing inline.
Support javascript call to play video while in fullscreen mode.

Change-Id: I4d11388790affc555b5420670a6783d8497b895b
CRs-fixed: 328354
Fix for HTML5 video volume setting issues

This change fixes video volume setting issues. With this change,
volume can be set before the video is prepared.

Change-Id: Icbae28ea82ea23cf58578824b16cddd743ec0ac6
webkit: Fix MR1 merge error in HTML5VideoInline

Call glGenTextures once if texture name is not available.

Change-Id: I9e2f3e6f5f5ab1b93fca17e21a0dd52efe7913fa
Add onVideoSizeChangedListener to HTML5VideoView

onVideoSizeChangedListener handles the corresponding event
to update size/duration of a video if they are unknown.
It is to support Media Player implementations where video
size is not known until playback starts.

Change-Id: I4cf9f8bd07b132a0f1a9039d88385b9b83ffde37
Webkit: Fix callback notification upon end of video playback

Trigger onEnded callback only upon video playback completion.

CRs-fixed: 333027

Change-Id: Iec88b6ad5c8045e278d8ae67c43b31c627fe871d
webkit: Show last frame of streaming video when buffering.

HTML5 Video now detects buffering state during streaming
videos and communicate this status to the video player
so that video player can present recent frame of
video during buffering instead of a grey frame.

Change-Id: I9277bf6ff28a3580dd542b86b160bfe845668265
CRs-fixed: 329061
webkit: Handle AudioManager callback events on webcore thread

AudioManager callback may occur on a thread other than the WebCore
thread.  To avoid synchronization of MediaPlayer calls outside the
WebCore thread, create a WebCore message handler and redirect
AudioManager events to the WebCore message handler.

Change-Id: I1120cba6af6fe5b84ea6e78366233e3352e61661
CRs-fixed: 343893
webkit: Support for video preloading

Support for video preloading and runtime media preload
browser configuration.

Change-Id: I0e106af9bed4b504f45820759bd373447a8efdac
Create VideoTextureView class for rendering pre-allocated SurfaceTextures

VideoTextureView class is based on TextureView. It creates a view for a
pre-allocated SurfaceTexture instead of generating its own.

It is used by the HTML5VideoView to create a View to render the
SurfaceTexture associated with the MediaPlayer in fullscreen mode.

Change-Id: I5ebcfbd4ff8eaff6791d57af1e906778689293fa
webkit: Single media player for HTML5 video inline and fullscreen

Use the same MediaPlayer for inline and fullscreen video to make the
inline to fullscreen transition smoother.

Share video SurfaceTexture for inline and fullscreen video modes.
This requires a new View subclass. See VideoTextureView.

Reduces network bandwidth since network connection is not
re-established during the transitions.

Change-Id: I49fe89e6fd4f07fa375296b5b7e826656c773798
webkit: HTML5 video inline and fullscreen transition animation

Do scale and translation animation during inline to fullscreen
transition and vice versa.

Change-Id: Id6ceaa337fd5b7794199b2fa9436113fa630ba62
webkit: Re-apply fix for MR1 merge error in HTML5VideoInline

Call glGenTextures once if texture name is not available.
Based on commit ID b44e799000304b2fb43c0026295573661f3aebcd.

Change-Id: Icb50dde1d16c104c3cc1ddc457a26feeef593848
webkit: Show correct HLS video aspect ratio in fullscreen mode

For HTTP live streaming video, video width and height may be unknown
during the time media is prepared resulting in incorrect aspect ratio
being displayed.

Listen for video size changed events and update the view layout when
video width and height become known so that video is displayed in the
correct aspect ratio in fullscreen mode.

CRs-fixed: 353131

Change-Id: Id3f608efb0f3c2d3386f2a8936b637913dbe7a2c
[WebKit] Fix duplicate SharedTimers

WebKit expects any active SharedTimer to be canceled when a
new SharedTimer request is generated from WebCore Timer module.
But currently Android SharedTimer implementation is not following this logic,
instead it leaves the old timers to be left in the queue along with the newly created
SharedTimer event, which results in WebCore timer creating additional
SharedTimer events when this old timer gets fired for no reason.

This patch avoids the above said cascading effect by cancelling
existing timers when a new shared timer gets created from WebCore.

Change-Id: Ib274af7ad4e0edeb6ddc901eb6a6295b8c671f02
CRs-fixed: 358427