| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/web_contents/aura/overscroll_navigation_overlay.h" | 5 #include "content/browser/web_contents/aura/overscroll_navigation_overlay.h" |
| 6 | 6 |
| 7 #include "content/browser/frame_host/navigation_entry_impl.h" | 7 #include "content/browser/frame_host/navigation_entry_impl.h" |
| 8 #include "content/browser/renderer_host/render_view_host_impl.h" | 8 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
| 10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 void OverscrollNavigationOverlay::DidFirstVisuallyNonEmptyPaint() { | 297 void OverscrollNavigationOverlay::DidFirstVisuallyNonEmptyPaint() { |
| 298 NavigationEntry* visible_entry = | 298 NavigationEntry* visible_entry = |
| 299 web_contents_->GetController().GetVisibleEntry(); | 299 web_contents_->GetController().GetVisibleEntry(); |
| 300 if (pending_entry_url_.is_empty() || | 300 if (pending_entry_url_.is_empty() || |
| 301 DoesEntryMatchURL(visible_entry, pending_entry_url_)) { | 301 DoesEntryMatchURL(visible_entry, pending_entry_url_)) { |
| 302 received_paint_update_ = true; | 302 received_paint_update_ = true; |
| 303 StopObservingIfDone(); | 303 StopObservingIfDone(); |
| 304 } | 304 } |
| 305 } | 305 } |
| 306 | 306 |
| 307 void OverscrollNavigationOverlay::DidStopLoading(RenderViewHost* host) { | 307 void OverscrollNavigationOverlay::DidStopLoading() { |
| 308 // Don't compare URLs in this case - it's possible they won't match if | 308 // Don't compare URLs in this case - it's possible they won't match if |
| 309 // a gesture-nav initiated navigation was interrupted by some other in-site | 309 // a gesture-nav initiated navigation was interrupted by some other in-site |
| 310 // navigation ((e.g., from a script, or from a bookmark). | 310 // navigation ((e.g., from a script, or from a bookmark). |
| 311 loading_complete_ = true; | 311 loading_complete_ = true; |
| 312 StopObservingIfDone(); | 312 StopObservingIfDone(); |
| 313 } | 313 } |
| 314 | 314 |
| 315 } // namespace content | 315 } // namespace content |
| OLD | NEW |