Index: content/browser/web_contents/aura/overscroll_navigation_overlay.cc |
diff --git a/content/browser/web_contents/aura/overscroll_navigation_overlay.cc b/content/browser/web_contents/aura/overscroll_navigation_overlay.cc |
index ac7b20c3af495bb144a507669e3b605818bfc14f..6cf234009d5963d91fdb079f2c887923691983a4 100644 |
--- a/content/browser/web_contents/aura/overscroll_navigation_overlay.cc |
+++ b/content/browser/web_contents/aura/overscroll_navigation_overlay.cc |
@@ -156,13 +156,8 @@ void OverscrollNavigationOverlay::SetupForTesting() { |
} |
void OverscrollNavigationOverlay::StopObservingIfDone() { |
- // If there is a screenshot displayed in the overlay window, then wait for |
- // the navigated page to complete loading and some paint update before |
- // hiding the overlay. |
- // If there is no screenshot in the overlay window, then hide this view |
- // as soon as there is any new painting notification. |
- if ((need_paint_update_ && !received_paint_update_) || |
- (image_delegate_->has_image() && !loading_complete_)) { |
+ // Hide this view as soon as there is any non-empty paint notification. |
+ if ((need_paint_update_ && !received_paint_update_)) { |
return; |
} |
@@ -313,11 +308,9 @@ void OverscrollNavigationOverlay::DocumentOnLoadCompletedInMainFrame( |
// pending entry has been created. |
int committed_entry_id = |
web_contents_->GetController().GetLastCommittedEntry()->GetUniqueID(); |
- // For the purposes of dismissing the overlay - consider the loading completed |
- // once the main frame has loaded. |
+ // Consider the loading completed once the main frame has loaded. |
if (committed_entry_id == pending_entry_id_ || !pending_entry_id_) { |
sky
2014/04/01 20:10:23
nit: no {}
|
loading_complete_ = true; |
- StopObservingIfDone(); |
} |
} |
@@ -342,7 +335,6 @@ void OverscrollNavigationOverlay::DidStopLoading(RenderViewHost* host) { |
RenderViewHostImpl* view = static_cast<RenderViewHostImpl*>(host); |
view->ScheduleComposite(); |
} |
- StopObservingIfDone(); |
} |
} |