Revert "Enable render throttling for OOPIFs"

This reverts commit 5abd7bfc86929cf97858d1e0a7e2d4d73fda0e2d.

Reason for revert: Suspected of causing PointerLockBrowserTest flake as detailed on crbug.com/784236.

Original change's description:
> Enable render throttling for OOPIFs
> 
> Throttle OOPIFs when they are off screen or clipped. This adds a
> VisibilityObserver to RemoteFrames with LocalFrame parents, and
> sends an update across processes to the OOPIF when throttling status
> should change.
> 
> This also fixes ScreenOrientation browser tests which has some
> flakiness in OOPIF tests that appears when this patch is applied.
> 
> Bug: 761478
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
> Change-Id: I9bfb57058e534e796c23e238664a66a142be3c4a
> Reviewed-on: https://chromium-review.googlesource.com/719601
> Reviewed-by: Daniel Cheng <[email protected]>
> Reviewed-by: Alex Moshchuk <[email protected]>
> Reviewed-by: Stefan Zager <[email protected]>
> Commit-Queue: Ken Buchanan <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#515875}

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

Change-Id: If713f93ff75ef4ea45853052fa05c3095f13e8aa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 761478
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Reviewed-on: https://chromium-review.googlesource.com/765847
Reviewed-by: Colin Blundell <[email protected]>
Commit-Queue: Colin Blundell <[email protected]>
Cr-Commit-Position: refs/heads/master@{#515923}
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 798db47..c257286 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -674,8 +674,6 @@
     IPC_MESSAGE_HANDLER(ViewMsg_SetViewportIntersection,
                         OnSetViewportIntersection)
     IPC_MESSAGE_HANDLER(ViewMsg_SetIsInert, OnSetIsInert)
-    IPC_MESSAGE_HANDLER(ViewMsg_UpdateRenderThrottlingStatus,
-                        OnUpdateRenderThrottlingStatus)
     IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests,
                         OnWaitNextFrameForTests)
     IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdates,
@@ -1850,32 +1848,20 @@
 
 void RenderWidget::OnSetViewportIntersection(
     const gfx::Rect& viewport_intersection) {
-  if (GetWebWidget()) {
-    DCHECK(GetWebWidget()->IsWebFrameWidget());
-    DCHECK_EQ(popup_type_, WebPopupType::kWebPopupTypeNone);
+  if (GetWebWidget() && GetWebWidget()->IsWebFrameWidget()) {
+    DCHECK(popup_type_ == WebPopupType::kWebPopupTypeNone);
     static_cast<WebFrameWidget*>(GetWebWidget())
         ->SetRemoteViewportIntersection(viewport_intersection);
   }
 }
 
 void RenderWidget::OnSetIsInert(bool inert) {
-  if (GetWebWidget()) {
-    DCHECK(GetWebWidget()->IsWebFrameWidget());
-    DCHECK_EQ(popup_type_, WebPopupType::kWebPopupTypeNone);
+  if (GetWebWidget() && GetWebWidget()->IsWebFrameWidget()) {
+    DCHECK(popup_type_ == WebPopupType::kWebPopupTypeNone);
     static_cast<WebFrameWidget*>(GetWebWidget())->SetIsInert(inert);
   }
 }
 
-void RenderWidget::OnUpdateRenderThrottlingStatus(bool is_throttled,
-                                                  bool subtree_throttled) {
-  if (GetWebWidget()) {
-    DCHECK(GetWebWidget()->IsWebFrameWidget());
-    DCHECK_EQ(popup_type_, WebPopupType::kWebPopupTypeNone);
-    static_cast<WebFrameWidget*>(GetWebWidget())
-        ->UpdateRenderThrottlingStatus(is_throttled, subtree_throttled);
-  }
-}
-
 void RenderWidget::OnDragTargetDragEnter(
     const std::vector<DropData::Metadata>& drop_meta_data,
     const gfx::Point& client_point,