Index: content/browser/renderer_host/render_widget_host_impl.h |
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h |
index b6aa99ec6f3c4147adec40a795432f45b41385ef..11dddf13c0f1ebfe7a95f53baaa4490f5c19f65c 100644 |
--- a/content/browser/renderer_host/render_widget_host_impl.h |
+++ b/content/browser/renderer_host/render_widget_host_impl.h |
@@ -325,8 +325,10 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost, |
void StopHangMonitorTimeout(); |
// Starts the rendering timeout, which will clear displayed graphics if |
- // a new compositor frame is not received before it expires. |
- void StartNewContentRenderingTimeout(); |
+ // a new compositor frame is not received before it expires. This also causes |
+ // any new compositor frames received with content_source_id less than |
+ // |next_source_id| to be discarded. |
+ void StartNewContentRenderingTimeout(uint32_t next_source_id); |
// Notification that a new compositor frame has been generated following |
// a page load. This stops |new_content_rendering_timeout_|, or prevents |
@@ -889,6 +891,14 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost, |
// renderer process before clearing any previously displayed content. |
base::TimeDelta new_content_rendering_delay_; |
+ // This identifier tags compositor frames according to the page load with |
+ // which they are associated, to prevent an unloaded web page from being |
+ // drawn after a navigation to a new page has already committed. This is |
+ // a no-op for non-top-level RenderWidgets, as that should always be zero. |
+ // TODO(kenrb, fsamuel): We should use SurfaceIDs for this purpose when they |
+ // are available in the renderer process. See https://crbug.com/695579. |
+ uint32_t current_content_source_id_; |
+ |
#if defined(OS_MACOSX) |
std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_; |
#endif |