| 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..ca590439ce44b7506a1d0486e19cf8c6bf79313c
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/reading_list/reading_list_distiller_page.h
|
| @@ -0,0 +1,43 @@
|
| +// 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_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 reading_list
|
| +
|
| +#endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_DISTILLER_PAGE_H_
|
|
|