Use a base::OnceClosure instead of WebLayoutAndPaintAsyncCallback.

This is now allowed across the Blink API, and also removes the need to write
manual "delete this;" code.

Change-Id: Iea4589d9ba5b826f6d7bd5d1dd08a1cf12228593
Reviewed-on: https://chromium-review.googlesource.com/1013063
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Antoine Labour <[email protected]>
Commit-Queue: Jeremy Roman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#551110}
diff --git a/content/renderer/gpu/render_widget_compositor.h b/content/renderer/gpu/render_widget_compositor.h
index 8b14536..9be9627 100644
--- a/content/renderer/gpu/render_widget_compositor.h
+++ b/content/renderer/gpu/render_widget_compositor.h
@@ -148,8 +148,7 @@
   void HeuristicsForGpuRasterizationUpdated(bool matches_heuristics) override;
   void SetNeedsBeginFrame() override;
   void DidStopFlinging() override;
-  void LayoutAndPaintAsync(
-      blink::WebLayoutAndPaintAsyncCallback* callback) override;
+  void LayoutAndPaintAsync(base::OnceClosure callback) override;
   void CompositeAndReadbackAsync(
       blink::WebCompositeAndReadbackAsyncCallback* callback) override;
   void SynchronouslyCompositeNoRasterForTesting() override;
@@ -254,7 +253,7 @@
   bool layer_tree_frame_sink_request_failed_while_invisible_ = false;
 
   bool in_synchronous_compositor_update_ = false;
-  blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_;
+  base::OnceClosure layout_and_paint_async_callback_;
 
   viz::FrameSinkId frame_sink_id_;