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

Unified Diff: components/dom_distiller/ios/distiller_page_ios.h

Issue 2604773002: Create distiller files for Reading List. (Closed)
Patch Set: Created 4 years 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/ios/distiller_page_ios.h
diff --git a/components/dom_distiller/ios/distiller_page_ios.h b/components/dom_distiller/ios/distiller_page_ios.h
index ddd55f31954c92a83aa7b78bcc8dc27b34e64af5..08f3d46a4031513a834a2b931e8231a3be8d97c8 100644
--- a/components/dom_distiller/ios/distiller_page_ios.h
+++ b/components/dom_distiller/ios/distiller_page_ios.h
@@ -10,7 +10,6 @@
#include "base/memory/weak_ptr.h"
#include "components/dom_distiller/core/distiller_page.h"
-#include "components/dom_distiller/ios/favicon_web_state_dispatcher.h"
#include "ios/web/public/web_state/web_state_observer.h"
#include "url/gurl.h"
@@ -22,29 +21,32 @@ class DistillerWebStateObserver;
// content.
class DistillerPageIOS : public DistillerPage {
public:
- explicit DistillerPageIOS(FaviconWebStateDispatcher* web_state_dispatcher);
+ explicit DistillerPageIOS(std::unique_ptr<web::WebState> web_state);
~DistillerPageIOS() override;
protected:
bool StringifyOutput() override;
void DistillPageImpl(const GURL& url, const std::string& script) override;
- private:
- friend class DistillerWebStateObserver;
+ std::unique_ptr<web::WebState> ReplaceWebState(
+ std::unique_ptr<web::WebState> web_state);
// Called by |web_state_observer_| once the page has finished loading.
- void OnLoadURLDone(web::PageLoadCompletionStatus load_completion_status);
+ virtual void OnLoadURLDone(
+ web::PageLoadCompletionStatus load_completion_status);
+ private:
+ friend class DistillerWebStateObserver;
// Called once the |script_| has been evaluated on the page.
void HandleJavaScriptResult(id result);
// Converts result of WKWebView script evaluation to base::Value
std::unique_ptr<base::Value> ValueResultFromScriptResult(id wk_result);
+ void DistillPage();
gambard 2016/12/27 09:35:58 Comment
gambard 2016/12/27 09:35:58 This function name is already used to start the di
Olivier 2016/12/27 10:08:36 This method is replaced by the inheritance. Remove
GURL url_;
std::string script_;
- web::WebState* web_state_;
- FaviconWebStateDispatcher* web_state_dispatcher_;
+ std::unique_ptr<web::WebState> web_state_;
std::unique_ptr<DistillerWebStateObserver> web_state_observer_;
base::WeakPtrFactory<DistillerPageIOS> weak_ptr_factory_;
};

Powered by Google App Engine
This is Rietveld 408576698