[Android] Allow use non Activity context to create ContentVideoView

ContentVideoView is making an assertion that the context used to create
it is an Activiy, which xwalk doesn't meet. So xwalk crashes when
trying to fullscreen a video.

Why upstream makes the assertion:
ContentVideoView will use context to getSystemService(WINDOW_SERVICE),
which requires an Activity context.

Why xwalk can work as well as break the assertion:
In xwalk case, it's using a MixContext which although the base context
is not an Activity, but the getSystemService call will be bridged to
an Activity finally.

Why can't this be upstreamed:
The real assertion is getSystemService must be called on an Activity,
upstream uses the equivalence that the context should be an Activity
is reasonable for most cases.

For more detail discussion, please refer upstream CL at:
https://codereview.chromium.org/67763004/

Since there's no easy way to detect whether the WindowManager got from
the Context is good or not, this patch to remove the assertion have
to stay in our fork.

BUG=https://crosswalk-project.org/jira/browse/XWALK-171
[SysApps] Expose ffmpeg function signatures needed by Device Capabilities API

We need these functions in to get the list of Codecs available in the
system for getAVCodecs(). If we ever fork ffmpeg, we can just remove
this patch and add the signatures directly at the ffmpeg's signature
list.
Fix default min-layout width and scrollbar appearence.

Fix scrollbar lengths so that they match up with the size of the content.
[Tizen] Use Tizen system location provider for geolocation subsystem

This patch enables Tizen geolocation provider, so that it could be
used by chromium geolocation subsystem.
[Android] Use application context for shared pref's creation

The shared pref here is to save the status for pak file extraction.
Since the pak file is extracted to each app's data folder, the
prefs also needs to be saved for each app individually.

For crosswalk usage, in shared mode, the context in
ResourceExtractor is the context for library apk. Use the
application context of it to get the app's context.

BUG=https://crosswalk-project.org/jira/browse/XWALK-228
[SysApps] Make CodecIDToAudioCodec and CodecIDToVideoCodec available as global functions

Make CodecIDToAudioCodec and CodecIDToVideoCodec available as global functions
so that they can be used by Device Capabilities getAVCodecs() interface to
query the list of supported codecs.
[Views] Customize _NET_WM_PID for X11 window backing a Widget

This patch allow us to customize the _NET_WM_PID property of a X11
window that is backing a views::Widget. A new attribute was added to
InitParams that contains the new value, if not set, the PID of the
current running process is used.

The reason for having this ability is to make Task Manager able to
raise the right X11 window when one "running application" is selected.

In Tizen Mobile, we use a shared browser process, that will create all
the windows, and the homescreen launches a different program that will
trigger the launch in the shared browser process. To make Task Manager
work properly we need to set the _NET_WM_PID of the windows we create to
the appropriate PID of the program

Since both Linux Desktop and Tizen Mobile use the
DesktopWindowTreeHostX11, we don't change DesktopWindowTreeHost.

Rework with 34.0.1847.45 code base.
[Android] Use the Chromium TLS for thread local storage allocation

On Android ICS, the max number of thread local storage is limited to 64.
Chromium TLS provides a mechanism to support large number of TLS slots
which is independent of OS restictions.

This commit is to make sure the ThreadLocalPointer uses the Chromium TLS
mechnism instead of directly calling pthread_create_key, so that it can
avoid the crash if the number of TLS slots allocated exceeds the max number
allowed by OS.

BUG=https://crosswalk-project.org/jira/browse/XWALK-841
[Views] Fix compiler initialization order errors.
[Android] Allow intercepter to extract paks

Embedders may want to put paks in res/raw instead of assets.
Because for Android Library project, assets is not handled well.
Add intercepter in ResourceExtractor to allow embedder to
provide the interceptable resources' list and the inputstream
to intercept with.
[Android] Turn on WebNotification runtime feature on Android

It's disabled for chrome on Android.
For crosswalk, it will have an implementation working with
Android Notification.

BUG=https://crosswalk-project.org/jira/browse/XWALK-94
[Tizen] Enable geolocation for Tizen

Currently, geolocation is enabled only for Tizen mobile profile.
This patch enables geolocation subsystem for Tizen IVI as well.
[Tizen] Hard code for va driver

This commit is not upstreamable, check details at
https://codereview.chromium.org/15955009/.

It can be mreged with previous libva patchset
d660a3e Enabling Hardware Acceleration with Libva in linux-x86.
[TIZEN] Tag the audio stream as "browser" in pulseaudio.

Tag the audio stream as "browser" in pulseaudio so that all the streams
coming from the web will be considered by Murphy as coming from the same
source and preempt them for example if there's a phone call coming.

At the moment the full Murphy integration is not in place due to some
integration issues with the main loop. But, once we have all the fixes
in place, we will directly connect to the Murphy's resource engine and
start receiving notifications when any another stream preempting the
streams tagged as 'browser'. This will make the Crosswalk fully
resource-aware.
[Android] Change the API for ApplicationStatus in base dir.

Chromium class inherits from Application directly. This is not suitable
for Crosswalk embedding API. Instead, define a new API which can pass Application
instance as the parameter instead of asking users' application inheriting from
Chromium Application.
This fix is due to the change in upstream:
https://codereview.chromium.org/159173002
[Temp] Add support to provide external ozone files in views.

The original patch comes from the ozone-wayland repository. It is
patches/0003-Add-support-to-provide-external-ozone-files-in-views.patch.

From the original commit message:

  We have un-necessary dependency on views. This is a temporary patch
  to include desktop_aura/ as part of view target.

One of the most practical results for us is that running a Crosswalk binary
built with -Dcomponent=shared_library works again.
[Android] Add a new API to simulate activity started on ApplicationStatusManager

When ApplicationStatus initialized after application started, the onActivityCreated(),
onActivityStarted() and onActivityResumed() callbacks will be missed.
This function will give the chance to simulate these three callbacks.

BUG=XWALK-1366
[Tizen IVI] Make HTML5 full screen API work on IVI.

Currently, Crosswalk for Ozone-wayland shows the title bar by default on IVI.
As a result, when webapps enter fullscreen mode using HTML5 fullscreen API,
their title bar still exist.

This patch allows to hide the title bar in fullscreen mode.

Bug: XWALK-896
[Android] Revert "Make the ResourceExtractor use the App context"

This reverts commit 0f1465d5fae40d3fd29b1c47e367eba488d7ef96.
For xwalk shared mode, the ResourceExtractor needs to read assets via Library Context
and write them to app data via App Context, so it must keep the original Context instead
of getting ApplicationContext of it.

BUG=https://crosswalk-project.org/jira/browse/XWALK-1384
[Android] Address Context leak in ResourceExtractor

The leak is fixed by commit "Make the ResourceExtractor
use the App context"(0f1465d5f), which is reverted
because xwalk shared mode needs to keep original Context.

In this commit, the static instance of ResourceExtractor
will be released after the background job is done. The
ResourceExtractor should not be used any more from that point.