Rename cc::CompositorFrameSink to cc::LayerTreeFrameSink

Along with all associated names such as clients and subclasses.

CompositorFrameSink is the name of the mojo APIs. Now that IPC is thru
mojo, these APIs are actual C++ type names. Having other C++ types with
the same name is eternally confusing.

In the future one day LayerTreeFrameSink will submit ContentFrames or
so instead of CompositorFrames, luckily its name won't need to change
at that time.

This CL is not opinionated on what things *should* be using. There are
some places that are using LayerTreeFrameSinks that clearly should not
be since they are not involved with LayerTreeHost. However this CL
makes these more obvious instead of being hidden.

Once this is done, we may rename the MojoCompositorFrameSink API to
CompositorFrameSink and be free of the mojom::Mojo conundrum.

[email protected], [email protected]
[email protected], [email protected]

Bug: 722935
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I26377c13f46fc7aff9bb4f43590ee7e42c00df40
Reviewed-on: https://chromium-review.googlesource.com/538096
Commit-Queue: danakj <[email protected]>
Reviewed-by: danakj <[email protected]>
Reviewed-by: Bo Liu <[email protected]>
Reviewed-by: kylechar <[email protected]>
Reviewed-by: Fady Samuel <[email protected]>
Cr-Commit-Position: refs/heads/master@{#481086}
diff --git a/content/renderer/gpu/render_widget_compositor.h b/content/renderer/gpu/render_widget_compositor.h
index 7afa1a68..84e8a29 100644
--- a/content/renderer/gpu/render_widget_compositor.h
+++ b/content/renderer/gpu/render_widget_compositor.h
@@ -32,6 +32,7 @@
 class AnimationHost;
 class InputHandler;
 class Layer;
+class LayerTreeFrameSink;
 class LayerTreeHost;
 class MutatorHost;
 }
@@ -199,9 +200,9 @@
                            float top_controls_delta) override;
   void RecordWheelAndTouchScrollingCount(bool has_scrolled_by_wheel,
                                          bool has_scrolled_by_touch) override;
-  void RequestNewCompositorFrameSink() override;
-  void DidInitializeCompositorFrameSink() override;
-  void DidFailToInitializeCompositorFrameSink() override;
+  void RequestNewLayerTreeFrameSink() override;
+  void DidInitializeLayerTreeFrameSink() override;
+  void DidFailToInitializeLayerTreeFrameSink() override;
   void WillCommit() override;
   void DidCommit() override;
   void DidCommitAndDrawFrame() override;
@@ -212,12 +213,12 @@
   // cc::LayerTreeHostSingleThreadClient implementation.
   void RequestScheduleAnimation() override;
   void DidSubmitCompositorFrame() override;
-  void DidLoseCompositorFrameSink() override;
+  void DidLoseLayerTreeFrameSink() override;
   void RequestBeginMainFrameNotExpected(bool new_state) override;
 
   enum {
-    COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK = 4,
-    MAX_COMPOSITOR_FRAME_SINK_RETRIES = 5,
+    LAYER_TREE_FRAME_SINK_RETRIES_BEFORE_FALLBACK = 4,
+    MAX_LAYER_TREE_FRAME_SINK_RETRIES = 5,
   };
 
  protected:
@@ -229,8 +230,8 @@
   cc::LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); }
 
  private:
-  void SetCompositorFrameSink(
-      std::unique_ptr<cc::CompositorFrameSink> compositor_frame_sink);
+  void SetLayerTreeFrameSink(
+      std::unique_ptr<cc::LayerTreeFrameSink> layer_tree_frame_sink);
   void LayoutAndUpdateLayers();
   void InvokeLayoutAndPaintCallback();
   bool CompositeIsSynchronous() const;