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

Unified Diff: ios/chrome/browser/dom_distiller/distiller_viewer.cc

Issue 2604773002: Create distiller files for Reading List. (Closed)
Patch Set: feedback Created 3 years, 12 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: ios/chrome/browser/dom_distiller/distiller_viewer.cc
diff --git a/ios/chrome/browser/dom_distiller/distiller_viewer.cc b/ios/chrome/browser/dom_distiller/distiller_viewer.cc
index 46a26ab3f414557283108f3ffd69000c9e89fa85..0ff0cdb93f7675a0eb805cfb6a4bae647ca361cd 100644
--- a/ios/chrome/browser/dom_distiller/distiller_viewer.cc
+++ b/ios/chrome/browser/dom_distiller/distiller_viewer.cc
@@ -21,15 +21,18 @@ DistillerViewer::DistillerViewer(
dom_distiller::DomDistillerService* distillerService,
PrefService* prefs,
const GURL& url,
- const DistillationFinishedCallback& callback)
+ const DistillationFinishedCallback& callback,
+ const DistillerPageFactory* factory)
: DistillerViewerInterface(distillerService, prefs),
url_(url),
callback_(callback) {
DCHECK(distillerService);
DCHECK(url.is_valid());
-
- std::unique_ptr<ViewerHandle> viewer_handle = distillerService->ViewUrl(
- this, distillerService->CreateDefaultDistillerPage(gfx::Size()), url);
+ std::unique_ptr<DistillerPage> page =
+ factory ? factory->CreateDistillerPage(gfx::Size())
+ : distillerService->CreateDefaultDistillerPage(gfx::Size());
+ std::unique_ptr<ViewerHandle> viewer_handle =
+ distillerService->ViewUrl(this, std::move(page), url);
TakeViewerHandle(std::move(viewer_handle));
}
« no previous file with comments | « ios/chrome/browser/dom_distiller/distiller_viewer.h ('k') | ios/chrome/browser/dom_distiller/dom_distiller_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698