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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/dom_distiller/ios/distiller_page_factory_ios.h" 5 #include "components/dom_distiller/ios/distiller_page_factory_ios.h"
6 6
7 #include "components/dom_distiller/ios/distiller_page_ios.h" 7 #include "components/dom_distiller/ios/distiller_page_ios.h"
8 #include "ios/web/public/browser_state.h" 8 #include "ios/web/public/browser_state.h"
9 9
10 namespace dom_distiller { 10 namespace dom_distiller {
11 11
12 DistillerPageFactoryIOS::DistillerPageFactoryIOS( 12 DistillerPageFactoryIOS::DistillerPageFactoryIOS(
13 web::BrowserState* browser_state) 13 web::BrowserState* browser_state,
14 : browser_state_(browser_state) { 14 const std::string& distiller_js_script)
15 : browser_state_(browser_state), distiller_js_script_(distiller_js_script) {
15 } 16 }
16 17
17 scoped_ptr<DistillerPage> DistillerPageFactoryIOS::CreateDistillerPage( 18 scoped_ptr<DistillerPage> DistillerPageFactoryIOS::CreateDistillerPage(
18 const gfx::Size& view_size) const { 19 const gfx::Size& view_size) const {
19 return make_scoped_ptr<DistillerPage>(new DistillerPageIOS(browser_state_)); 20 return make_scoped_ptr<DistillerPage>(
21 new DistillerPageIOS(browser_state_, distiller_js_script_));
20 } 22 }
21 23
22 scoped_ptr<DistillerPage> 24 scoped_ptr<DistillerPage>
23 DistillerPageFactoryIOS::CreateDistillerPageWithHandle( 25 DistillerPageFactoryIOS::CreateDistillerPageWithHandle(
24 scoped_ptr<SourcePageHandle> handle) const { 26 scoped_ptr<SourcePageHandle> handle) const {
25 return make_scoped_ptr<DistillerPage>(new DistillerPageIOS(browser_state_)); 27 return make_scoped_ptr<DistillerPage>(
28 new DistillerPageIOS(browser_state_, distiller_js_script_));
26 } 29 }
27 30
28 } // namespace dom_distiller 31 } // namespace dom_distiller
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698