ViewHostMsg_UpdateRect => ViewHostMsg_ResizeOrRepaint_ACK

While fixing up resize for surface synchronization, I noticed that we're
STILL using IPC naming from the old software rendering path days. Gone are
the days of updating rects on a backing store in the browser process.

This CL uses naming that better matches what's going on today.
ViewHostMsg_UpdateRect is really used as a throttling ACK for resizes
or repaints.

This CL renames mentions of UpdateRect and backing stores.

Bug: 672962
TBR: [email protected]
Change-Id: Ice2e44c3726e80da29b6d173e5f436b34f2792c3
Reviewed-on: https://chromium-review.googlesource.com/692814
Commit-Queue: Fady Samuel <[email protected]>
Reviewed-by: Antoine Labour <[email protected]>
Reviewed-by: Steven Holte <[email protected]>
Reviewed-by: Ken Buchanan <[email protected]>
Cr-Commit-Position: refs/heads/master@{#505923}
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 3988ed7..c7b91ad2 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -978,7 +978,7 @@
 
 void RenderWidget::DidReceiveCompositorFrameAck() {
   TRACE_EVENT0("renderer", "RenderWidget::DidReceiveCompositorFrameAck");
-  DidResizeAck();
+  DidResizeOrRepaintAck();
 }
 
 bool RenderWidget::IsClosing() const {
@@ -1319,8 +1319,9 @@
   // send an ACK if we are resized to a non-empty rect.
   if (params.new_size.IsEmpty() || params.physical_backing_size.IsEmpty()) {
     // In this case there is no paint/composite and therefore no
-    // ViewHostMsg_UpdateRect to send the resize ack with. We'd need to send the
-    // ack through a fake ViewHostMsg_UpdateRect or a different message.
+    // ViewHostMsg_ResizeOrRepaint_ACK to send the resize ack with. We'd need to
+    // send the ack through a fake ViewHostMsg_ResizeOrRepaint_ACK or a
+    // different message.
     DCHECK(!params.needs_resize_ack);
   }
 
@@ -2055,15 +2056,16 @@
 }
 
 bool RenderWidget::next_paint_is_resize_ack() const {
-  return ViewHostMsg_UpdateRect_Flags::is_resize_ack(next_paint_flags_);
+  return ViewHostMsg_ResizeOrRepaint_ACK_Flags::is_resize_ack(
+      next_paint_flags_);
 }
 
 void RenderWidget::set_next_paint_is_resize_ack() {
-  next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK;
+  next_paint_flags_ |= ViewHostMsg_ResizeOrRepaint_ACK_Flags::IS_RESIZE_ACK;
 }
 
 void RenderWidget::set_next_paint_is_repaint_ack() {
-  next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK;
+  next_paint_flags_ |= ViewHostMsg_ResizeOrRepaint_ACK_Flags::IS_REPAINT_ACK;
 }
 
 void RenderWidget::OnImeEventGuardStart(ImeEventGuard* guard) {
@@ -2174,7 +2176,7 @@
       // deferring commits and thus submission of CompositorFrames.
       if (!size_.IsEmpty() && compositor_ &&
           compositor_->IsSurfaceSynchronizationEnabled()) {
-        DidResizeAck();
+        DidResizeOrRepaintAck();
       }
     }
   }
@@ -2480,16 +2482,16 @@
   widget_binding_.Bind(std::move(request));
 }
 
-void RenderWidget::DidResizeAck() {
+void RenderWidget::DidResizeOrRepaintAck() {
   if (!next_paint_flags_ && !need_update_rect_for_auto_resize_)
     return;
 
-  ViewHostMsg_UpdateRect_Params params;
+  ViewHostMsg_ResizeOrRepaint_ACK_Params params;
   params.view_size = size_;
   params.flags = next_paint_flags_;
   params.sequence_number = ++resize_or_repaint_ack_num_;
 
-  Send(new ViewHostMsg_UpdateRect(routing_id_, params));
+  Send(new ViewHostMsg_ResizeOrRepaint_ACK(routing_id_, params));
   next_paint_flags_ = 0;
   need_update_rect_for_auto_resize_ = false;
 }