Establish mojo service between Canvas (blink) and SurfaceManager (browser)

This patch adds a new mojo message pipe between Canvas in blink and
the Surface management on browser, to facilitate the out-of-process commit flow
from OffscreenCanvas to browser. This patch only implements the first two
IPC to ensure SurfaceLayer on renderer, SurfaceId/Surface on browser are
created.

The implementation can be seen in three parts: client, browser host, and mojo
service interface. Some codes are added to an existing layout test to test if
the whole workflow works.

Client:
CanvasSurfaceLayerBridge is HTMLCanvasElement's communicator with SurfaceLayer.
It is created only when HTMLCanvasElement.transferControlToOffscreen() is invoked.
It has an instance of CanvasSurfaceLayerBridgeClient, which is a virtual interface
containing all mojo calls. To create a SurfaceLayer, it sends a sync msg
"GetSurfaceId" to browser to retrieve a unique SurfaceId. Immediately after that,
it sends an async msg "RequestSurfaceCreation" to request Surface getting created
for this particular Id. After that, it creates a SurfaceLayer (with SatisfyCallback
and RequireCallback) for HTMLCanvasElement and set the SurfaceId for the layer and
registers it to the graphics layer. A unit test is added; it fakes the browser side
and mocks the BridgeClient.

Browser:
OffscreenCanvasSurfaceServiceImpl sits on the other end of the mojo message pipe.
It is created when all the mojo connections are registered in render_process_host.
It responds to requests from CanvasSurfaceLayerBridge and do SurfaceId generation,
SurfaceFactory and Surface creation accordingly. It is a client of SurfaceFactory.

Mojo service interface:
It is defined in offscreen_canvas_surface_service.mojom. It defines two structs:
SurfaceId and SurfaceSequence, that correspondds to that in cc. I use typemaps to
convert cc::SurfaceId and cc::SurfaceSequence to the corresponding mojo intermediate
structs.

BUG=611796, 563852
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review-Url: https://codereview.chromium.org/2036663003
Cr-Commit-Position: refs/heads/master@{#400838}
29 files changed