Pass Surface ID namespace to renderer compositors.

In order to enable renderer processes to create SurfaceSequences, they
have to receive Surface ID namespaces from the browser process so that
they can avoid collisions.

BUG=478802

Committed: https://crrev.com/c7a5afd66499fc8442e1b3146f55b227638934d8
Cr-Commit-Position: refs/heads/master@{#329708}

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

Cr-Commit-Position: refs/heads/master@{#329852}
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 0b8d2fff..9b66dad 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -748,6 +748,7 @@
     IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection)
     IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck)
     IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects)
+    IPC_MESSAGE_HANDLER(ViewMsg_SetSurfaceIdNamespace, OnSetSurfaceIdNamespace)
 #if defined(OS_ANDROID)
     IPC_MESSAGE_HANDLER(ViewMsg_ShowImeIfNeeded, OnShowImeIfNeeded)
     IPC_MESSAGE_HANDLER(ViewMsg_ImeEventAck, OnImeEventAck)
@@ -1748,6 +1749,11 @@
   Send(new ViewHostMsg_UpdateScreenRects_ACK(routing_id()));
 }
 
+void RenderWidget::OnSetSurfaceIdNamespace(uint32_t surface_id_namespace) {
+  if (compositor_)
+    compositor_->SetSurfaceIdNamespace(surface_id_namespace);
+}
+
 void RenderWidget::showImeIfNeeded() {
   OnShowImeIfNeeded();
 }