| Index: ios/chrome/browser/reading_list/reading_list_distiller_page_factory.mm
|
| diff --git a/ios/chrome/browser/reading_list/reading_list_distiller_page_factory.mm b/ios/chrome/browser/reading_list/reading_list_distiller_page_factory.mm
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d405a6b80a644f1205df7c5543c58870cc4be0cb
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/reading_list/reading_list_distiller_page_factory.mm
|
| @@ -0,0 +1,38 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "ios/chrome/browser/reading_list/reading_list_distiller_page_factory.h"
|
| +
|
| +#include "base/memory/ptr_util.h"
|
| +#include "ios/chrome/browser/reading_list/favicon_web_state_dispatcher_impl.h"
|
| +#include "ios/chrome/browser/reading_list/reading_list_distiller_page.h"
|
| +#include "ios/web/public/browser_state.h"
|
| +
|
| +namespace reading_list {
|
| +
|
| +ReadingListDistillerPageFactory::ReadingListDistillerPageFactory(
|
| + web::BrowserState* browser_state)
|
| + : browser_state_(browser_state) {
|
| + web_state_dispatcher_ =
|
| + base::MakeUnique<reading_list::FaviconWebStateDispatcherImpl>(
|
| + browser_state_, -1);
|
| +}
|
| +
|
| +ReadingListDistillerPageFactory::~ReadingListDistillerPageFactory() {}
|
| +
|
| +std::unique_ptr<dom_distiller::DistillerPage>
|
| +ReadingListDistillerPageFactory::CreateDistillerPage(
|
| + const gfx::Size& view_size) const {
|
| + return base::MakeUnique<ReadingListDistillerPage>(
|
| + browser_state_, web_state_dispatcher_.get());
|
| +}
|
| +
|
| +std::unique_ptr<dom_distiller::DistillerPage>
|
| +ReadingListDistillerPageFactory::CreateDistillerPageWithHandle(
|
| + std::unique_ptr<dom_distiller::SourcePageHandle> handle) const {
|
| + return base::MakeUnique<ReadingListDistillerPage>(
|
| + browser_state_, web_state_dispatcher_.get());
|
| +}
|
| +
|
| +} // namespace reading_list
|
|
|