Introduce cc::LocalFrameId and use in SurfaceFactory

This CL introduces cc::LocalFrameId which is the (local_id, nonce)
part of the SurfaceId. This is the part that can be allocated by
the renderer asynchronously on resize or initial creation. The
FrameSinkId component of a SurfaceId remains constant across resizes
as it identifies a FrameSink/FrameSource as opposed to individual
surfaces.

Since SurfaceFactory is tied to a single FrameSink now, passing in
SurfaceIds including FrameSinkIds is redundant and invites API
abuse by passing in SurfaceIds that don't belong to the given
FrameSink. This will result in a DCHECK, but in production, once
SurfaceIds are allocated in the renderer, then one client could
clobber a surface of another client (albeit this is unlikely due to the
nonce), or it could confuse surface ID routing and fool the parent
to embed a surface ID belonging to a different client (since
FrameSinkIds are guessable).

This change eliminates this concern by making it impossible to pass a
different FrameSinkId into SurfaceFactory; the API simply does not allow
for it.

BUG=647852
TBR=dtrainor@chromium.org, reveman@chromium.org, sky@chromium.org, boliu@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://codereview.chromium.org/2388753003
Cr-Commit-Position: refs/heads/master@{#423371}
71 files changed