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

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

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.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..9ff76a92b3860775f8cc399bf3e6f6a0853901ab
--- /dev/null
+++ b/ios/chrome/browser/reading_list/reading_list_distiller_page_factory.h
@@ -0,0 +1,44 @@
+// 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 web {
+class BrowserState;
+}
+
+namespace reading_list {
+class FaviconWebStateDispatcher;
+
+// ReadingListDistillerPageFactory is an iOS-specific implementation of the
+// DistillerPageFactory interface allowing the creation of DistillerPage
+// instances.
+// These instances are configured to distille the articles of the Reading List.
+class ReadingListDistillerPageFactory
+ : public dom_distiller::DistillerPageFactory {
+ public:
+ explicit ReadingListDistillerPageFactory(web::BrowserState* browser_state);
+ ~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:
+ web::BrowserState* browser_state_;
+ 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