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

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

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.h
diff --git a/ios/chrome/browser/reading_list/reading_list_distiller_page_factory.h b/ios/chrome/browser/reading_list/reading_list_distiller_page_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..12eefecdb608a26c12a4371eb7758c73c7452bc9
--- /dev/null
+++ b/ios/chrome/browser/reading_list/reading_list_distiller_page_factory.h
@@ -0,0 +1,39 @@
+// 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.
+
+#ifndef IOS_CHROME_BROWSER_READING_LIST_READING_LIST_DISTILLER_PAGE_FACTORY_H_
+#define IOS_CHROME_BROWSER_READING_LIST_READING_LIST_DISTILLER_PAGE_FACTORY_H_
+
+#include <memory>
+
+#include "components/dom_distiller/core/distiller_page.h"
+
+namespace reading_list {
+class FaviconWebStateDispatcher;
+
+// DistillerPageFactoryIOS is an iOS-specific implementation of the
+// DistillerPageFactory interface allowing the creation of DistillerPage
+// instances.
+class ReadingListDistillerPageFactory
+ : public dom_distiller::DistillerPageFactory {
+ public:
+ explicit ReadingListDistillerPageFactory(
+ std::unique_ptr<FaviconWebStateDispatcher> web_state_dispatcher);
+ ~ReadingListDistillerPageFactory() override;
+
+ // Implementation of DistillerPageFactory:
+ std::unique_ptr<dom_distiller::DistillerPage> CreateDistillerPage(
+ const gfx::Size& view_size) const override;
+ std::unique_ptr<dom_distiller::DistillerPage> CreateDistillerPageWithHandle(
+ std::unique_ptr<dom_distiller::SourcePageHandle> handle) const override;
+
+ private:
+ std::unique_ptr<FaviconWebStateDispatcher> web_state_dispatcher_;
+
+ DISALLOW_COPY_AND_ASSIGN(ReadingListDistillerPageFactory);
+};
+
+} // namespace reading_list
+
+#endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_DISTILLER_PAGE_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698