Communicate the lifecycle state back up to the RenderFrameHost.
The lifecycle state is currently communicated back to the
DocumentResource coordinator. The instantiation of that class is
tied to the browser's resource coordinator instance. So the browser
has no notion of frame being frozen at the content level. This
change adds such communication.
The source of freezing comes from two sources, the renderer and
the browser. The browser may also request a page to be frozen
however it may not take effect until a later time like the load
event firing.
BUG=957597
Change-Id: I64bd263643edd8afadecb5ab063008a238c2042c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1676233
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Ken Buchanan <[email protected]>
Reviewed-by: Jeremy Roman <[email protected]>
Commit-Queue: Dave Tapuska <[email protected]>
Cr-Commit-Position: refs/heads/master@{#673381}
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index 99a8f60..38760661 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -476,6 +476,10 @@
// status.
VisibilityChanged(blink.mojom.FrameVisibility visibility);
+ // Notifies the browser that the current frame has changed its lifecycle
+ // state.
+ LifecycleStateChanged(blink.mojom.FrameLifecycleState state);
+
// Updates information to determine whether a user gesture should carryover to
// future navigations. This is needed so navigations within a certain
// timeframe of a request initiated by a gesture will be treated as if they