[Android] Support building standalone APK in component build

Many people's workflows assume that they can install the APK created in
out/Debug/apks. With the component build that APK is actually an
"incomplete" APK that cannot be manually installed (or rather causes
obscure errors when manually installed).

This change does two things. First, it moves the "incomplete" APK
output to out/Debug/<package_name>/<ApkName>.apk. This should prevent
accidental installs of the "incomplete" APK. Second, it introduces an
option (create_standalone_apk) that when doing a component build, if
set, will merge the shared libraries into the "incomplete" APK to
create a standalone APK. This standalone APK will be created in
out/Debug/apks/.

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=207345

Review URL: https://chromiumcodereview.appspot.com/14843017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207516 0039d316-1c4b-4281-b951-d872f2087c98
Add a switch to retain video playback on lost focus

In Android, default behavior is to pause video playback when the app
goes background. However, in some apps, it is preferable to retain
video playback even when the app lost the focus. Add a switch for this
behavior so that apps can choose whether to use this behavior or not.

BUG=249985
R=qinmin@chromium.org,ycheo@chromium.org,jochen@chromium.org,joi@chromium.org

Review URL: https://chromiumcodereview.appspot.com/16914005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207517 0039d316-1c4b-4281-b951-d872f2087c98
Fixed javascript errors in early initialization in Files.app.

Sometimes, when a user resized the window while the initialization was in progress, a javascript errors occured. Directory tree can't be relayouted when it is not created yet. The directory tree is created in late initialization, therefore we have to check if it is already created before allinc the relayout() method on it.

TEST=Tested manually.
BUG=None

Review URL: https://chromiumcodereview.appspot.com/17044004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207518 0039d316-1c4b-4281-b951-d872f2087c98
Don't crash when SimpleCache index is corrupt.

Some new histograms didn't deal with the failure case properly. Now fixed.

BUG=251465
R=pasko@chromium.org, rdsmith@chromium.org

Review URL: https://codereview.chromium.org/17420004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207520 0039d316-1c4b-4281-b951-d872f2087c98
Record error when CreateDir fails.

There's not been too much success retrying CreateDir in the wild. Only
once has it succeeded after an error. This patch will let us see what
errors it is encountering and can't recover from.

BUG=225051

Review URL: https://chromiumcodereview.appspot.com/17151017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207521 0039d316-1c4b-4281-b951-d872f2087c98
Remove suppressions for bug 222601.

The warning was caused by race inside XFixes when running
ScreenCaptureDeviceTest and ScreenCapturerTest. ScreenCapturerDevice uses
XFixes on a parallel thread that later competes with ScreenCapturerTest.
The failure doesn't happen anymore because the tests have been moved to
different locations (content and webrtc), so the suppressions are not
needed anymore.

It's not completely clear what causes the failure in the first place.
XextFindDisplay() seems to be thread-safe (
http://cvsweb.xfree86.org/cvsweb/*checkout*/xc/lib/Xext/extutil.c?rev=1.8
) - it locks _Xglocal_lock before accessing global values.

BUG=222601
R=wez@chromium.org

Review URL: https://codereview.chromium.org/17412011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207522 0039d316-1c4b-4281-b951-d872f2087c98
content_shell: Use a ThreadRestrictions::ScopedAllowWait for layout tests on Android.

Because of the nested message pump implementation used by Android for
running layout tests, which uses a base::WaitableEvent to wait for new
messages, we need to allow waiting on the UI thread.

The ScopedAllowWaitForAndroidLayoutTest class has been implemented as
a member of the WebKitTestController, to ensure that the exception's
lifetime is tied to the layout test controller itself.

BUG=232044
R=jam@chromium.org, jochen@chromium.org

Review URL: https://codereview.chromium.org/17395002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207523 0039d316-1c4b-4281-b951-d872f2087c98
ResourceProvider::AcquireImage early out if already acquired

If an image resource has been acquired, then calling AcquireImage again
does not need to release and create a new image.

AcquireImage assumptions that no longer hold:
1) The image resource must not be mapped to memory already, since
AcquireImage is no longer going to unmap in this case.
2) The mapped buffer may not be empty.

Currently ImageRasterWorkerPool works with these constraints.

BUG=

Review URL: https://chromiumcodereview.appspot.com/17153005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207524 0039d316-1c4b-4281-b951-d872f2087c98
Enable looping of videos in Files.app.

By clicking the play button or the video while holding CTRL, the video will play in a looped mode. The mode is reset after pausing.

TEST=Go to Files.app and play a video. Hit the play button, or the video area with CTRL pressed. A message should be shown and the video should get looped.
BUG=249238

Review URL: https://chromiumcodereview.appspot.com/17153007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207525 0039d316-1c4b-4281-b951-d872f2087c98
Fix line ending confusion with a whitespace change to these files.
The svn:eol props are correct but the file content is not.
Git on windows at least is confused by this. Hopefully,
this will clear things up?

Review URL: https://codereview.chromium.org/16816021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207526 0039d316-1c4b-4281-b951-d872f2087c98
Whitelist another app for Pepper socket APIs.

BUG=165080
TEST=none

Review URL: https://chromiumcodereview.appspot.com/17157012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207527 0039d316-1c4b-4281-b951-d872f2087c98
net: add (*.)bccx.com to HSTS preloaded list.

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207528 0039d316-1c4b-4281-b951-d872f2087c98
Fixed launching managed user creation flow.

BUG=252000
TEST=manually
R=dpolukhin@chromium.org, ygorshenin@chromium.org

Review URL: https://codereview.chromium.org/17261020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207529 0039d316-1c4b-4281-b951-d872f2087c98
content_shell: Don't change the pixel format for Android layout test images anymore.

These exceptions used to be necessary for DumpRenderTree, however, it seems
that Android has aligned with other platforms. With this code build in, the
red and blue channels were inverted in the result images, however, after
removing the code the result images were just fine. Let's drop it :-).

BUG=232044
R=jamesr@chromium.org, jochen@chromium.org

Review URL: https://codereview.chromium.org/17406003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207530 0039d316-1c4b-4281-b951-d872f2087c98
[NaCl SDK] .dsc files copy public headers, add ppapi_cpp dev sources

The headers were previously copied by build_sdk, but since we already support
installing headers from the .dsc files, it seems like a better place to do it.
It also forces us to be explicit about the headers/sources we want to include
from ppapi_cpp.

BUG=250997
R=sbc@chromium.org

Review URL: https://codereview.chromium.org/17261007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207531 0039d316-1c4b-4281-b951-d872f2087c98
Fix browser crash when enabling managed extensions in incognito.

DisableExtension is aborting early for managed extensions because the user is not allowed to disable managed extensions, which causes a CHECK() to fail. However, it should be ok to disable managed extensions for reload purposes.

BUG=249294

Review URL: https://chromiumcodereview.appspot.com/17451006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207532 0039d316-1c4b-4281-b951-d872f2087c98
Added NET_EXPORT into mDns code.

Review URL: https://chromiumcodereview.appspot.com/17451010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207533 0039d316-1c4b-4281-b951-d872f2087c98
Fixed the UMA for webrtc sample rates. We need to map the sample rate to media::AudioSampleRate before we add the stat to the history.

How the old ADM did, please look at AddHistogramSampleRate() in
https://chromiumcodereview.appspot.com/11270012/diff/34001/content/renderer/media/webrtc_audio_device_impl.cc

Review URL: https://chromiumcodereview.appspot.com/17465009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207534 0039d316-1c4b-4281-b951-d872f2087c98
Added strings for Relaunch and Powerwash button.

BUG=219292
TEST=none

Review URL: https://chromiumcodereview.appspot.com/17465011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207535 0039d316-1c4b-4281-b951-d872f2087c98
content_shell: Load the correct fonts and reset hinting for Android layout tests

This fixes most of the text differences in layout tests, because Android's
default serif font is much wider than the one used on Linux. Load the
right font configuration files through Skia and set up WebKit to use
normal font hinting.

BUG=232044
R=jochen@chromium.org

Review URL: https://codereview.chromium.org/17405002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207536 0039d316-1c4b-4281-b951-d872f2087c98