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

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

Issue 2604773002: Create distiller files for Reading List. (Closed)
Patch Set: Created 4 years 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..9acfa0d53460eab16bf4cb85bbca258cd8f2b2ca
--- /dev/null
+++ b/ios/chrome/browser/reading_list/reading_list_distiller_page_factory.mm
@@ -0,0 +1,34 @@
+// 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 "components/reading_list/ios/favicon_web_state_dispatcher.h"
+#include "ios/chrome/browser/reading_list/reading_list_distiller_page.h"
+#include "ios/web/public/browser_state.h"
+
+namespace reading_list {
+
+ReadingListDistillerPageFactory::ReadingListDistillerPageFactory(
+ std::unique_ptr<FaviconWebStateDispatcher> web_state_dispatcher)
+ : web_state_dispatcher_(std::move(web_state_dispatcher)) {}
+
+ReadingListDistillerPageFactory::~ReadingListDistillerPageFactory() {}
+
+std::unique_ptr<dom_distiller::DistillerPage>
+ReadingListDistillerPageFactory::CreateDistillerPage(
+ const gfx::Size& view_size) const {
+ return base::MakeUnique<ReadingListDistillerPage>(
+ web_state_dispatcher_.get());
+}
+
+std::unique_ptr<dom_distiller::DistillerPage>
+ReadingListDistillerPageFactory::CreateDistillerPageWithHandle(
+ std::unique_ptr<dom_distiller::SourcePageHandle> handle) const {
+ return base::MakeUnique<ReadingListDistillerPage>(
+ web_state_dispatcher_.get());
+}
+
+} // namespace dom_distiller
gambard 2016/12/27 09:35:59 Update namespace
Olivier 2016/12/27 10:08:37 Done.

Powered by Google App Engine
This is Rietveld 408576698