Implement a modal permission dialog on Android gated by a feature.

This CL implements a modal prompt for geolocation, notifications,
protected media, and MIDI permission requests on Android. This prompt is
disabled by default behind the ModalPermissionPrompts feature. It can be
triggered when the feature is enabled and a permission request is made
with a user gesture. Optionally, a variations parameter can disable the
user gesture requirement.

The new prompt style attracts more attention than an infobar as it
sits in the middle of the screen and dims the content behind it. It is
intended to experiment with this to a small percentage of users to see
if it improves the permission decision rate without detracting from the
user experience. In particular, it is hoped that the more prominent
prompt will lead to more permission decisions being made, which will
reduce the overall number of prompts triggered.

Permissions may be asynchronously requested. Previously, this was
handled on Android by stacking requests for different permissions in
different infobars behind one another. However, dialogs can only be
shown once at a time, which the C++ PermissionQueueController has no way
of doing. Instead, a lightweight Java-side PermissionDialogController is
introduced which queues up multiple requests and displays them one at
a time.

For simplicity, the modal dialog delegate class simply wraps the
existing PermissionInfoBarDelegate class when the ModalPermissionPrompts
feature is active. Upcoming refactoring will eliminate all
PermissionInfoBarDelegate subclasses, and consolidate the information in
those classes into a new PermissionPromptAndroid class which will be
wrapped by GroupedPermissionInfoBarDelegate. At that time, the
PermissionDialogDelegate will be changed to wrap PermissionPromptAndroid
as well.

The Geolocation Android test is revamped to test that infobars, dialogs,
and gestures interact and trigger appropriately.

BUG=658125

Review-Url: https://codereview.chromium.org/2446063002
Cr-Commit-Position: refs/heads/master@{#428943}
17 files changed