Do not try to verify focus placement in ClearBrowserDataBrowserTest.

The test was flaky because of a more general bug in the WebUI framework (crbug.com/380737). This latter bug exhibits itself when, during opening a WebUI overlay, the BrowserWindow loses focus -- which happens a lot on build bots running multiple browser tests in parallel.

BUG=379574

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275128 0039d316-1c4b-4281-b951-d872f2087c98
MacViews: Cleanup: Remove some USE_AURA from app_list.

MacViews is going to have an accelerated UI compositor, and it's taken
enough shape to know some code guarded by USE_AURA is going to work
fine.

This change unguards some code in the app list around accellerated
animations and layers. The guards actually are no longer guarding
enough. Attempting to use them as-is will quickly crash when some
unguarded code expects a layer() to be non-NULL.

Some USE_AURA guards remain around aura::Window usage, which will be
refactored in a follow-up.

The cleanup fixes a couple of files missing newlines at the end, since
that offends clang on Mac.

BUG=365977

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275129 0039d316-1c4b-4281-b951-d872f2087c98
Generate enums for mojo java bindings.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275130 0039d316-1c4b-4281-b951-d872f2087c98
Not checking data channel ready state in test if unreliable.

We have been seeing these for a while in cases where the data channels
are unreliable:

From javascript: Error: expected 'open', got 'closed'.
    at failTest (http://127.0.0.1:50117/media/webrtc_test_utilities...
    at assertEquals (http://127.0.0.1:50117/media/...
    at RTCDataChannel.secondDataChannel.onmessage (peerconnection.html)

Since the test will re-send messages until they get through if the
data channel is unreliable, my hypothesis is that we get a race
between the repeated message sending and the channel shutdown when
channel 1 receives its reflected message. Like this:

Channel 1: send message every 200 ms
Channel 2: once we get a message, reply it to channel 1 every 200 ms.
           Note this reply loop will start for every message received.
Channel 1: once we get a message, close the channel.

So if channel 1 received a reply just after sending a message, the
channel shutdown will race with the message. Since there are no
guarantees in the spec that the channel is open when onmessage gets
called (messages could be buffered), it is incorrect to assume that
the channel will always be open.

We can make that assumption in the reliable case though as the test
will only send one message and not retry, so there is no message to
race with the shutdown.

BUG=373637
R=jiayl@chromium.org
CC=perkj@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275131 0039d316-1c4b-4281-b951-d872f2087c98
Fix a test so it runs with --enable-apps-show-on-first-paint.

To do this a new test-only event has been added allowing apps to send
test messages after their window has been created.

BUG=225843

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275132 0039d316-1c4b-4281-b951-d872f2087c98
Measure signed-in profiles using their GAIA image, statefully.

BUG=357693

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275133 0039d316-1c4b-4281-b951-d872f2087c98
Add browser-global GCMDriver

This CL adds a browser-global GCMDriver instance. This GCM connection can
be used even if no session is in progress and no user is signed in.

Since GCMDriverDesktop was originally meant to work for signed-in users
only, it still depends on an IdentityProvider. The CL introduces a
temporary DummyIdentityProvider to satisfy the dependency. This dummy
class will be deleted when GCMDriver's dependency on IdentityProvider is
removed.

BUG=376746
TEST=Covered by GCMDriverTest.* unit tests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275134 0039d316-1c4b-4281-b951-d872f2087c98
Hook up GCMDriverAndroid callbacks

GCMDriverAndroid used to ignore callbacks and app handlers.
It will now properly pass on events received from Java.

Depends on https://codereview.chromium.org/312683004/

BUG=350378
TBR=pavely@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275135 0039d316-1c4b-4281-b951-d872f2087c98
install-build-deps: Install libudev1:i386 for Ubuntu 14.04

libudev0:i386 is not avaiable on Ubuntu 14.04, while libudev1:i386 does.
The script should aware this.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275136 0039d316-1c4b-4281-b951-d872f2087c98
Revert of Enable touch text selection by default on desktop Aura (https://codereview.chromium.org/305423003/)

Reason for revert:
This change has broken two Blink layout-tests, context-menu-on-long-press.html
and right-click-gestures-set-cursor-at-correct-position.html.

More relevant information, failed runs and output is available in the bug.

BUG=381152


Original issue's description:
> Enable touch text selection by default on desktop Aura
> 
> --disable-touch-editing can be used to disable touch text selection.
> 
> BUG=304872
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=274972

TBR=sky@chromium.org,mohsen@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=304872

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275138 0039d316-1c4b-4281-b951-d872f2087c98
Revert 274991 "Fix Views web-modal dialog widget creation."

MediaGalleriesPlatformAppBrowserTest.Scan is timing out consistently after this CL, so speculatively reverting.

http://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%281%29/builds/31455

> Fix Views web-modal dialog widget creation.
> 
> r272016 regressed web-modal dialog shadow styling.
> Use CreateDialogWidget for dialog creation to fix that.
> Only set SHADOW_TYPE_NONE for new-style dialogs there.
> (removes the double border, consolidates dialog widget init)
> Take WidgetDelegate for ConstrainedWebDialogDelegateViewViews.
> Mark web-modals as ui::MODAL_TYPE_CHILD and child widgets.
> 
> Remove now unused Widget::CreateWindowAsFramelessChild.
> (keep a copy for the system-modal captive portal dialog)
> (that dialog is very odd, system-modal and "web-modal"?)
> 
> Add [Create|Show]WebModalDialogViews helper functions.
> Use these for c/b/ui/views web-modal dialog init/show.
> (cannot be used by c/b/chromeos, so cleanup less there)
> Cleanup includes, cached widgets, using statements, etc.
> 
> BUG=376646,378970
> TEST=Views tab-modal dialogs appear as expected.
> R=wittman@chromium.org,sky@chromium.org
> 
> Review URL: https://codereview.chromium.org/301393002

TBR=msw@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275139 0039d316-1c4b-4281-b951-d872f2087c98
Add IPC::ChannelProxy::Create() and IPC::SyncChannel::Create()

This change replaces constructors with Create() methods of
ChannelProxy and SyncChannel. This open the possibility to introduce
polymorphism to these classes.

This is a revision of r274310 (https://codereview.chromium.org/301973003/)
in which I added bunch of Create*() method variants.
The chagne was reverted. This change no longer does it and just keeps
using Channel::Mode to specify the channel type.

TEST=none
BUG=377980
R=darin@chromium.org,jam@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275140 0039d316-1c4b-4281-b951-d872f2087c98
Mojo: Make Channel::OnFatalError() less spammy.

Also:
* Remove RawChannel::Delegate::FATAL_ERROR_UNKNOWN (it was unused).
* Rename FATAL_ERROR_FAILED_{READ,WRITE} to simply
  FATAL_ERROR_{READ,WRITE}. (In addition to being redundant/verbose,
  "failed read" was a bit misleading: the error may well have been in
  *waiting* to read, not reading per se.)

R=yzshen@chromium.org

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

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

In this CL, we:
- Make PermissionsData not-so-static. Only methods which either don't rely on
  knowledge of specific permissions or methods to get/create the object are
  static.
- Separate runtime permissions knowledge from manifest parsing (PermissionsData
  vs PermissionsParser)
- Move required/optional permissions access into PermissionsParser.
- Handle the locking issues.

BUG=379356
TBR=sky@chromium.org (for c/b/ui/, no functional changes)

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275142 0039d316-1c4b-4281-b951-d872f2087c98
Fixed glitch in the initial user cloud policy validation on ChromeOS.

The previous code was trying to extract the management domain from the
sanitized (hashed) username, which always fails.

BUG=380682

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275143 0039d316-1c4b-4281-b951-d872f2087c98
Initiation of corruption in IDB test is now *in* the test.

Not all corruption tests need to corrupt the actual IndexedDB. To support
this these test have been refactored and it's now the job of each test to
corrupt the IDB on disk if (and when) desired.

BUG=222266

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275144 0039d316-1c4b-4281-b951-d872f2087c98
Mojo: Refactor Options struct validation some more.

And make SharedBufferDispatcher::DuplicateBufferHandle() use the same
mechanism.

R=sky@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275145 0039d316-1c4b-4281-b951-d872f2087c98
Add support for JSON output to checkperms.py

BUG=99191
R=maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275146 0039d316-1c4b-4281-b951-d872f2087c98
Add support for JSON output to checklicenses.py

BUG=128664
R=maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275147 0039d316-1c4b-4281-b951-d872f2087c98
Do not exclude pdf from DEPS check.

Otherwise the DEPS file under pdf/ directory has no effect.

As a result of enabling it, some entries had to be added.

BUG=None
TEST=./tools/checkdeps/checkdeps.py - SUCCESS
R=thestig@chromium.org

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

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