Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Unified Diff: components/dom_distiller/content/browser/distillability_driver.h

Issue 1883023004: Reader Mode triggers after tab crash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@distillability-mojo
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/dom_distiller/content/browser/distillability_driver.h
diff --git a/components/dom_distiller/content/browser/distillability_driver.h b/components/dom_distiller/content/browser/distillability_driver.h
index 87a532daa244f76129be5f62dbc76bdcdccded1e..581a408f9b4d888692d3473b9a4a6fa815851bf5 100644
--- a/components/dom_distiller/content/browser/distillability_driver.h
+++ b/components/dom_distiller/content/browser/distillability_driver.h
@@ -8,6 +8,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "components/dom_distiller/content/common/distillability_service.mojom.h"
+#include "content/public/browser/navigation_details.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
@@ -26,19 +27,19 @@ class DistillabilityDriver
void SetDelegate(const base::Callback<void(bool, bool)>& delegate);
// content::WebContentsObserver implementation.
- void RenderProcessGone(base::TerminationStatus status) override;
+ void DidNavigateMainFrame(
+ const content::LoadCommittedDetails& details,
+ const content::FrameNavigateParams& params) override;
+
private:
explicit DistillabilityDriver(content::WebContents* web_contents);
friend class content::WebContentsUserData<DistillabilityDriver>;
friend class DistillabilityServiceImpl;
+ void SetupMojoService();
void OnDistillability(bool distillable, bool is_last);
- // Removes the observer, clears the WebContents member, and removed mojo
- // service from registry.
- void CleanUp();
-
base::Callback<void(bool, bool)> m_delegate_;
base::WeakPtrFactory<DistillabilityDriver> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698