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

Unified Diff: components/dom_distiller/ios/distiller_page_factory_ios.mm

Issue 2529283002: Save favicon during reading list distillation (Closed)
Patch Set: Using web state 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_factory_ios.mm
diff --git a/components/dom_distiller/ios/distiller_page_factory_ios.mm b/components/dom_distiller/ios/distiller_page_factory_ios.mm
index ad355f9cd18cb87eb9ae69dcf77277295a459681..dde6d874b635eeb969eb4c33a3b23d640bd7e1f7 100644
--- a/components/dom_distiller/ios/distiller_page_factory_ios.mm
+++ b/components/dom_distiller/ios/distiller_page_factory_ios.mm
@@ -6,24 +6,33 @@
#include "base/memory/ptr_util.h"
#include "components/dom_distiller/ios/distiller_page_ios.h"
+#include "components/dom_distiller/ios/favicon_observer_factory.h"
#include "ios/web/public/browser_state.h"
+#include "ios/web/public/web_state/web_state.h"
namespace dom_distiller {
DistillerPageFactoryIOS::DistillerPageFactoryIOS(
- web::BrowserState* browser_state)
- : browser_state_(browser_state) {
+ web::BrowserState* browser_state,
+ FaviconObserverFactory* favicon_factory) {
+ const web::WebState::CreateParams webStateCreateParams(browser_state);
Eugene But (OOO till 7-30) 2016/12/08 15:34:53 web_state_create_params
gambard 2016/12/12 15:04:26 Done.
+ web_state_ = web::WebState::Create(webStateCreateParams);
kkhorimoto 2016/12/08 22:15:24 As per higher level discussion on this CL, we shou
gambard 2016/12/12 15:04:26 Acknowledged.
+
+ favicon_factory->AddFaviconObserver(web_state_.get(), browser_state);
}
std::unique_ptr<DistillerPage> DistillerPageFactoryIOS::CreateDistillerPage(
const gfx::Size& view_size) const {
- return base::WrapUnique<DistillerPage>(new DistillerPageIOS(browser_state_));
+ return base::WrapUnique<DistillerPage>(
+ new DistillerPageIOS(web_state_.get()));
}
+DistillerPageFactoryIOS::~DistillerPageFactoryIOS() {}
std::unique_ptr<DistillerPage>
DistillerPageFactoryIOS::CreateDistillerPageWithHandle(
std::unique_ptr<SourcePageHandle> handle) const {
- return base::WrapUnique<DistillerPage>(new DistillerPageIOS(browser_state_));
+ return base::WrapUnique<DistillerPage>(
+ new DistillerPageIOS(web_state_.get()));
}
} // namespace dom_distiller

Powered by Google App Engine
This is Rietveld 408576698