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

Unified Diff: ios/chrome/browser/reading_list/reading_list_distiller_page_factory.mm

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/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

Powered by Google App Engine
This is Rietveld 408576698