| 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));
|
| }
|
|
|