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

Unified Diff: ios/chrome/browser/reading_list/reading_list_distiller_page.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.h
diff --git a/ios/chrome/browser/reading_list/reading_list_distiller_page.h b/ios/chrome/browser/reading_list/reading_list_distiller_page.h
new file mode 100644
index 0000000000000000000000000000000000000000..c4cc73cf64647ae4a84a83dbd44756debfc4ef5c
--- /dev/null
+++ b/ios/chrome/browser/reading_list/reading_list_distiller_page.h
@@ -0,0 +1,43 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
gambard 2016/12/27 09:35:59 Update year?
Olivier 2016/12/27 10:08:37 Done.
+// 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_H_
+#define IOS_CHROME_BROWSER_READING_LIST_READING_LIST_DISTILLER_PAGE_H_
+
+#include <memory>
+#include <string>
+
+#include "base/memory/weak_ptr.h"
+#include "components/dom_distiller/ios/distiller_page_ios.h"
+#include "components/reading_list/ios/favicon_web_state_dispatcher.h"
+#include "ios/web/public/web_state/web_state_observer.h"
+#include "url/gurl.h"
+
+namespace reading_list {
+
+// Loads URLs and injects JavaScript into a page, extracting the distilled page
+// content.
+class ReadingListDistillerPage : public dom_distiller::DistillerPageIOS {
+ public:
+ explicit ReadingListDistillerPage(
+ FaviconWebStateDispatcher* web_state_dispatcher);
+ ~ReadingListDistillerPage() override;
+
+ protected:
+ void DistillPageImpl(const GURL& url, const std::string& script) override;
+ void OnDistillationDone(const GURL& page_url,
+ const base::Value* value) override;
+ void OnLoadURLDone(
+ web::PageLoadCompletionStatus load_completion_status) override;
+
+ private:
+ void DelayedOnLoadURLDone(
+ web::PageLoadCompletionStatus load_completion_status);
+ FaviconWebStateDispatcher* web_state_dispatcher_;
+ base::WeakPtrFactory<ReadingListDistillerPage> weak_ptr_factory_;
+};
+
+} // namespace dom_distiller
gambard 2016/12/27 09:35:58 Update namespace
Olivier 2016/12/27 10:08:37 Done.
+
+#endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_DISTILLER_PAGE_H_

Powered by Google App Engine
This is Rietveld 408576698