Check renderer client id for offscreen canvas.

Add a check before creating an OffscreenCanvasSurfaceImpl or
MojoCompositorFrameSink for offscreen canvas. The renderer should only
be using FrameSinkIds within it's own namespace.

Without this check, a malicious renderer could learn about SurfaceIds
from other clients by guessing the FrameSinkId. After creating an
OffscreenCanvasSurfaceImpl any new SurfaceIds for the FrameSinkId get
forwarded back to the renderer.

BUG=664547
TBR=piman@chromium.org

Review-Url: https://codereview.chromium.org/2811413002
Cr-Commit-Position: refs/heads/master@{#465300}
3 files changed