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

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

Issue 901793002: Add support for providing an external file for extracting content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved injection to constructor Created 5 years, 9 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/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 20e9af90d23d7219338e5be477d1a1953ce3c612..851e9e42a51485c25f4b3700d7c7df1b34285cb3 100644
--- a/components/dom_distiller/ios/distiller_page_factory_ios.mm
+++ b/components/dom_distiller/ios/distiller_page_factory_ios.mm
@@ -10,19 +10,22 @@
namespace dom_distiller {
DistillerPageFactoryIOS::DistillerPageFactoryIOS(
- web::BrowserState* browser_state)
- : browser_state_(browser_state) {
+ web::BrowserState* browser_state,
+ const std::string& distiller_js_script)
+ : browser_state_(browser_state), distiller_js_script_(distiller_js_script) {
}
scoped_ptr<DistillerPage> DistillerPageFactoryIOS::CreateDistillerPage(
const gfx::Size& view_size) const {
- return make_scoped_ptr<DistillerPage>(new DistillerPageIOS(browser_state_));
+ return make_scoped_ptr<DistillerPage>(
+ new DistillerPageIOS(browser_state_, distiller_js_script_));
}
scoped_ptr<DistillerPage>
DistillerPageFactoryIOS::CreateDistillerPageWithHandle(
scoped_ptr<SourcePageHandle> handle) const {
- return make_scoped_ptr<DistillerPage>(new DistillerPageIOS(browser_state_));
+ return make_scoped_ptr<DistillerPage>(
+ new DistillerPageIOS(browser_state_, distiller_js_script_));
}
} // namespace dom_distiller

Powered by Google App Engine
This is Rietveld 408576698