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

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

Issue 2529283002: Save favicon during reading list distillation (Closed)
Patch Set: Add a comment Created 4 years, 1 month 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 9c799852b91e05c62ddb66aca1555eecaadd07e4..a9ed1a1dbf43322f69b052f12e0a222ffaa57c01 100644
--- a/components/dom_distiller/ios/distiller_page_ios.h
+++ b/components/dom_distiller/ios/distiller_page_ios.h
@@ -23,13 +23,15 @@ class BrowserState;
namespace dom_distiller {
+class DistillerFaviconIOS;
class DistillerWebStateObserver;
// Loads URLs and injects JavaScript into a page, extracting the distilled page
// content.
class DistillerPageIOS : public DistillerPage {
public:
- explicit DistillerPageIOS(web::BrowserState* browser_state);
+ explicit DistillerPageIOS(web::BrowserState* browser_state,
+ DistillerFaviconIOS* distiller_favicon);
~DistillerPageIOS() override;
protected:
@@ -45,6 +47,11 @@ class DistillerPageIOS : public DistillerPage {
// Called once the |script_| has been evaluated on the page.
void HandleJavaScriptResult(id result);
+ // Called once the script for finding the favicons on the page has been
+ // evaluated. Extracts the data from the |result| and let |distiller_favicon_|
Eugene But (OOO till 7-30) 2016/11/30 18:51:30 Please describe what |result| is, including it's a
+ // handle the URL.
+ void HandleFaviconResult(id result);
+
// Converts result of WKWebView script evaluation to base::Value
std::unique_ptr<base::Value> ValueResultFromScriptResult(id wk_result);
@@ -53,6 +60,7 @@ class DistillerPageIOS : public DistillerPage {
std::string script_;
std::unique_ptr<ios::WebControllerProvider> provider_;
std::unique_ptr<DistillerWebStateObserver> web_state_observer_;
+ DistillerFaviconIOS* distiller_favicon_;
base::WeakPtrFactory<DistillerPageIOS> weak_ptr_factory_;
};

Powered by Google App Engine
This is Rietveld 408576698