Unify RenderWidgetHostView(ChildFrame and Guest) compositing code

This CL achieves two goals:

- Right now the code in OnSwapCompositorFrame methods in
RenderWidgetHostViewChildFrame and RenderWidgetHostViewGuest are almost
identical. This CL extracts the common parts of these two methods into
a new method called ProcessCompositorFrame to minimize code
duplication.

- Switches to cc::SurfaceInfo in IPC communications to simplify the
API and be consistent with Mojo which already uses SurfaceInfo.

[email protected]

BUG=668890
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2633303003
Cr-Commit-Position: refs/heads/master@{#445585}
diff --git a/content/renderer/render_frame_proxy.h b/content/renderer/render_frame_proxy.h
index 1fd5858..aee4d65 100644
--- a/content/renderer/render_frame_proxy.h
+++ b/content/renderer/render_frame_proxy.h
@@ -22,7 +22,7 @@
 }
 
 namespace cc {
-class SurfaceId;
+class SurfaceInfo;
 struct SurfaceSequence;
 }
 
@@ -162,9 +162,7 @@
   void OnDeleteProxy();
   void OnChildFrameProcessGone();
   void OnCompositorFrameSwapped(const IPC::Message& message);
-  void OnSetChildFrameSurface(const cc::SurfaceId& surface_id,
-                              const gfx::Size& frame_size,
-                              float scale_factor,
+  void OnSetChildFrameSurface(const cc::SurfaceInfo& surface_info,
                               const cc::SurfaceSequence& sequence);
   void OnUpdateOpener(int opener_routing_id);
   void OnDidStopLoading();