| 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
|
| index 891de56b75bacf33df1669a332442005352dad33..8ebbfc80d42a8075b9b29628af6be86ddd660ff1 100644
|
| --- a/ios/chrome/browser/reading_list/reading_list_distiller_page.h
|
| +++ b/ios/chrome/browser/reading_list/reading_list_distiller_page.h
|
| @@ -24,11 +24,17 @@ class FaviconWebStateDispatcher;
|
| // and add a 2 seconds delay between loading and distillation.
|
| class ReadingListDistillerPage : public dom_distiller::DistillerPageIOS {
|
| public:
|
| + typedef base::Callback<void(const GURL&, const GURL&)> RedirectionCallback;
|
| +
|
| explicit ReadingListDistillerPage(
|
| web::BrowserState* browser_state,
|
| FaviconWebStateDispatcher* web_state_dispatcher);
|
| ~ReadingListDistillerPage() override;
|
|
|
| + // Sets a callback that will be called just before distillation happen with
|
| + // the URL of the page that will effectively be distilled.
|
| + void SetRedirectionCallback(RedirectionCallback redirection_callback);
|
| +
|
| protected:
|
| void DistillPageImpl(const GURL& url, const std::string& script) override;
|
| void OnDistillationDone(const GURL& page_url,
|
| @@ -53,7 +59,7 @@ class ReadingListDistillerPage : public dom_distiller::DistillerPageIOS {
|
| // Handles the JavaScript response. If the URL of the iframe is returned,
|
| // triggers a navigation to it. Stop distillation of the page there as the new
|
| // load will trigger a new distillation.
|
| - bool HandleGoogleCachedAMPPageJavaScriptResult(id result, NSError* error);
|
| + bool HandleGoogleCachedAMPPageJavaScriptResult(id result, id error);
|
|
|
| // Waits a delay then calls DelayedOnLoadURLDone.
|
| void WaitForPageLoadCompletion();
|
| @@ -61,6 +67,9 @@ class ReadingListDistillerPage : public dom_distiller::DistillerPageIOS {
|
| // Continues distillation by calling superclass |OnLoadURLDone|.
|
| void DelayedOnLoadURLDone();
|
|
|
| + RedirectionCallback redirection_callback_;
|
| + GURL original_url_;
|
| +
|
| FaviconWebStateDispatcher* web_state_dispatcher_;
|
| base::WeakPtrFactory<ReadingListDistillerPage> weak_ptr_factory_;
|
| };
|
|
|