| Index: components/dom_distiller/content/browser/web_contents_main_frame_observer.cc
|
| diff --git a/components/dom_distiller/content/browser/web_contents_main_frame_observer.cc b/components/dom_distiller/content/browser/web_contents_main_frame_observer.cc
|
| index 51fd6906c221b9a860cd5f49b104d06bfaf1729d..d3e48c759e5bf38d6933dafb3c533c7c4ee0121d 100644
|
| --- a/components/dom_distiller/content/browser/web_contents_main_frame_observer.cc
|
| +++ b/components/dom_distiller/content/browser/web_contents_main_frame_observer.cc
|
| @@ -4,7 +4,7 @@
|
|
|
| #include "components/dom_distiller/content/browser/web_contents_main_frame_observer.h"
|
|
|
| -#include "content/public/browser/navigation_details.h"
|
| +#include "content/public/browser/navigation_handle.h"
|
| #include "content/public/browser/render_frame_host.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
| @@ -31,13 +31,16 @@ void WebContentsMainFrameObserver::DocumentLoadedInFrame(
|
| }
|
| }
|
|
|
| -void WebContentsMainFrameObserver::DidNavigateMainFrame(
|
| - const content::LoadCommittedDetails& details,
|
| - const content::FrameNavigateParams& params) {
|
| - if (details.is_navigation_to_different_page()) {
|
| - is_document_loaded_in_main_frame_ = false;
|
| - is_initialized_ = true;
|
| +void WebContentsMainFrameObserver::DidFinishNavigation(
|
| + content::NavigationHandle* navigation_handle) {
|
| + if (!navigation_handle->IsInMainFrame() ||
|
| + !navigation_handle->HasCommitted() ||
|
| + navigation_handle->IsSamePage()) {
|
| + return;
|
| }
|
| +
|
| + is_document_loaded_in_main_frame_ = false;
|
| + is_initialized_ = true;
|
| }
|
|
|
| void WebContentsMainFrameObserver::RenderProcessGone(
|
|
|