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 17e3e82bff430ca29fc5826587cb998ecfb9a050..16e36b4fac56950d20298f0f1567cdc88506e02f 100644 |
--- a/content/browser/renderer_host/render_widget_host_impl.h |
+++ b/content/browser/renderer_host/render_widget_host_impl.h |
@@ -263,9 +263,11 @@ class CONTENT_EXPORT RenderWidgetHostImpl |
// a new compositor frame is not received before it expires. |
void StartNewContentRenderingTimeout(); |
- // Stops the rendering timeout and prevents it from clearing any displayed |
- // graphics. |
- void StopNewContentRenderingTimeout(); |
+ // Notification that a new compositor frame has been generated following |
+ // a page load. This stops |new_content_rendering_timeout_|, or prevents |
+ // the timer from running if the load commit message hasn't been received |
+ // yet. |
+ void OnFirstPaintAfterLoad(); |
// Forwards the given message to the renderer. These are called by the view |
// when it has received a message. |
@@ -811,6 +813,18 @@ class CONTENT_EXPORT RenderWidgetHostImpl |
scoped_ptr<TimeoutMonitor> new_content_rendering_timeout_; |
+ // This boolean is true if RenderWidgetHostImpl receives a compositor frame |
+ // from a newly loaded page before StartNewContentRenderingTimeout() is |
+ // called. This means that a paint for the new load has completed before |
+ // the browser received a DidCommitProvisionalLoad message. In that case |
+ // |new_content_rendering_timeout_| is not needed. The renderer will send |
+ // both the FirstPaintAfterLoad and DidCommitProvisionalLoad messages after |
+ // any new page navigation, it doesn't matter which is received first, and |
+ // it should not be possible to interleave other navigations in between |
+ // receipt of those messages (unless FirstPaintAfterLoad is prevented from |
+ // being sent, in which case the timer should fire). |
+ bool received_paint_after_load_; |
+ |
#if defined(OS_WIN) |
std::list<HWND> dummy_windows_for_activation_; |
#endif |