Revert 238458 "cc: Defer first OutputSurface creation until clie..."

Reason: Candidate for Mac 10.6 and 10.7 Break - IOSurfaceReuse

> cc: Defer first OutputSurface creation until client is ready
> 
> Remove the |first_output_surface| which was not used before
> the client signals ready.
> This allows the client to wait before creating a graphics context
> until the gpu thread and client channel are set up.
> 
> BUG=270179
> R=danakj@chromium.org, jamesr@chromium.org, jochen@chromium.org
> 
> Review URL: https://codereview.chromium.org/85693007

TBR=sievers@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238470 0039d316-1c4b-4281-b951-d872f2087c98
Remove separate thread for the shell on Android.

The shell is now run on the main (UI) thread along with the NativeViewport stuff.

R=abarth@chromium.org
http://crbug.com/324637

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238474 0039d316-1c4b-4281-b951-d872f2087c98
Hook up GN to the GYP build system.

This is a reland of 236542 and 238454 (runs GN in GYP mode before actually running GYP), plus some additions

Move GYP_DEFINES parsing to Python for GN.

I pass in a GN-compatible list of variable sets on the command line from Python. This allows us to parse chromium.gyp_env and src/*/supplemental.gypi in Python like normal without having to duplicate Python dictionary parsing in GN.

Currently, GN does not produce any files used by the build, these will be added in a second step.

BUG=321352
TBR=bradnelson@google.com

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238475 0039d316-1c4b-4281-b951-d872f2087c98
[Mojo] Move JS bindings out of public

This CL moves the implementation of Mojo's JavaScript bindings out of the
"public" directory. The public directory is intended to be free of dependencies
on other parts of Chromium, but the JavaScript bindings depend on V8 and base.
Now, the bindings are just a subdirectory of mojo/apps/js, which is their only
client. This makes mojo.js more of a self-contained app.

R=darin@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238476 0039d316-1c4b-4281-b951-d872f2087c98
Merge branch 'master' into pullgn2

Conflicts:
	tools/gn/bin/win/gn.exe.sha1

iPull GN binary at 238460

Pull Windows GN binary @238460 (debug build).

This is to help debuf issues since it will have proper stack traces.

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238479 0039d316-1c4b-4281-b951-d872f2087c98
Fix flaky AudioStreamHandler initialization.

AudioStreamHandler was calling into the AudioManager on the wrong
thread.  On OSX this will lead to undefined behavior since the
CoreAudio API is not thread safe.

Sadly due to antique unit tests, we don't have the proper DCHECKs
in place to catch bad behavior automatically.  I've filed the bug
below to track this effort.

In this case we can simply use a fixed buffer size since ASH is
using MakeAudioOutputStreamProxy() which will take care of any
necessary rebuffering and resampling.

BUG=325373
TEST=none
R=scherkus@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238484 0039d316-1c4b-4281-b951-d872f2087c98
Fix crash during build/gyp_chromium time.

Without GYP_DEFINES set, build/gyp_chromium would crash with

Generating gyp files from GN...
Traceback (most recent call last):
  File "./build/gyp_chromium", line 207, in <module>
    if not RunGN(supplemental_includes):
  File "./build/gyp_chromium", line 147, in RunGN
    gyp_vars = GetVarsStringForGN(supplemental_includes)
  File "./build/gyp_chromium", line 79, in GetVarsStringForGN
    items = shlex.split(env_string)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shlex.py", line 279, in split
    return list(lex)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shlex.py", line 269, in next
    token = self.get_token()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shlex.py", line 96, in get_token
    raw = self.read_token()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shlex.py", line 124, in read_token
    nextchar = self.instream.read(1)
AttributeError: 'list' object has no attribute 'read'

This was broken by r238475

BUG=321352

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238486 0039d316-1c4b-4281-b951-d872f2087c98
Mojo: (POSIX) Pass channel handle to child.

R=darin@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238487 0039d316-1c4b-4281-b951-d872f2087c98
Enable PRESUMIT checks for ModifierOrder, ImportOrder and Trailing Whitespace.

R=newt@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238488 0039d316-1c4b-4281-b951-d872f2087c98
Fix crash in gyp. TBR=brettw

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238489 0039d316-1c4b-4281-b951-d872f2087c98
- Moved ldpi assets to mdpi where they belong based on their size.
- Removed original mdpi density.

R=newt@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238492 0039d316-1c4b-4281-b951-d872f2087c98
Check getconf to get the bittedness of the local system.

This checks the bittedness of the local system using getconf instead of "file
/sbin/init". "file" isn't on some ChromeOS roots.

BUG=
R=thakis@chromium.org
TBR=thakis

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238493 0039d316-1c4b-4281-b951-d872f2087c98
Convert GN hyphens to underscores when passing command line args.

Some GYP variables are named like "pkg-config"

Replace - with _ when doing converting GN variable names.

TBR=michaeln

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238494 0039d316-1c4b-4281-b951-d872f2087c98
Disable AppWindowAPI.TestRestoreGeometryCacheChange on Mac

Flaky failures, see bug

BUG=324915
TEST=browser_tests
R=asargent@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238497 0039d316-1c4b-4281-b951-d872f2087c98
Renderer-compositor bindings for mix-blend-mode

This patch will link the blink implementation for mix-blend-mode with
the compositor implementation.
Blink: https://codereview.chromium.org/23511004/
Cc: https://codereview.chromium.org/23455060/

BUG=243223

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

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

r238462 - https://codereview.chromium.org/100303005/
may have broken this test. anantha@chromium.org will investigate and fix this issue.

BUG=325540
TBR=sky

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238499 0039d316-1c4b-4281-b951-d872f2087c98
Remember user permissions for camera and microphone access for https WebRTC calls in Android

BUG=307027

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238500 0039d316-1c4b-4281-b951-d872f2087c98
Attempt to fix audio wedges by restarting all streams on OSX.

Introduces two new methods to AudioOutputDispatcher:
CloseStreamsForWedgeFix() and RestartStreamsForWedgeFix().

Respectively, each method closes or restarts all active
streams owned by a given dispatcher.  The process is
completely transparent to upstream clients.

A new method on AudioManager, FixWedgedAudio() calls
CloseStreamsForWedgeFix() for all dispatchers and then
calls RestartStreamsForWedgeFix() afterward.

FixWedgedAudio() is called by each AudioOutputController
when a wedge is detected.  Multiple in flight wedge checks
are serialized by the audio thread.  The hope is that wedges
will be fixed before the next WedgeCheck() fires.

While the methods are available on all platforms, FixWedgedAudio()
is only wired up on OSX.

BUG=160920
TEST=unittest. fake wedge and observe stream recreation.
R=scherkus@chromium.org

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238501 0039d316-1c4b-4281-b951-d872f2087c98
Convert PepperBrowserConnection to be a RenderFrameObserver.

BUG=245126
R=nasko@chromium.org, yzshen@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238502 0039d316-1c4b-4281-b951-d872f2087c98
Add generic interfaces for the sinks of the media stream audio track to get the audio data, and this patch also adds interfaces of AddToAudioTrack and RemoveFromAudioTrack to connect the sink to the audio track.


BUG=322547

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

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