Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef IOS_CHROME_BROWSER_READING_LIST_READING_LIST_DISTILLER_PAGE_H_ | |
| 6 #define IOS_CHROME_BROWSER_READING_LIST_READING_LIST_DISTILLER_PAGE_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/memory/weak_ptr.h" | |
| 12 #include "components/dom_distiller/ios/distiller_page_ios.h" | |
| 13 #include "components/reading_list/ios/favicon_web_state_dispatcher.h" | |
|
gambard
2016/12/27 13:56:57
Can you use forward declaration?
Olivier
2016/12/27 14:52:15
Done.
| |
| 14 #include "ios/web/public/web_state/web_state_observer.h" | |
|
gambard
2016/12/27 13:56:57
Not needed.
Olivier
2016/12/27 14:52:15
Done.
| |
| 15 #include "url/gurl.h" | |
| 16 | |
| 17 namespace web { | |
| 18 class BrowserState; | |
| 19 } | |
| 20 | |
| 21 namespace reading_list { | |
| 22 | |
| 23 // Loads URLs and injects JavaScript into a page, extracting the distilled page | |
| 24 // content. | |
| 25 class ReadingListDistillerPage : public dom_distiller::DistillerPageIOS { | |
|
gambard
2016/12/27 13:56:57
Update comment?
Olivier
2016/12/27 14:52:15
Done.
| |
| 26 public: | |
| 27 explicit ReadingListDistillerPage( | |
| 28 web::BrowserState* browser_state, | |
| 29 FaviconWebStateDispatcher* web_state_dispatcher); | |
| 30 ~ReadingListDistillerPage() override; | |
| 31 | |
| 32 protected: | |
| 33 void DistillPageImpl(const GURL& url, const std::string& script) override; | |
| 34 void OnDistillationDone(const GURL& page_url, | |
| 35 const base::Value* value) override; | |
| 36 void OnLoadURLDone( | |
| 37 web::PageLoadCompletionStatus load_completion_status) override; | |
| 38 | |
| 39 private: | |
| 40 void DelayedOnLoadURLDone( | |
| 41 web::PageLoadCompletionStatus load_completion_status); | |
| 42 FaviconWebStateDispatcher* web_state_dispatcher_; | |
| 43 base::WeakPtrFactory<ReadingListDistillerPage> weak_ptr_factory_; | |
| 44 }; | |
| 45 | |
| 46 } // namespace reading_list | |
| 47 | |
| 48 #endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_DISTILLER_PAGE_H_ | |
| OLD | NEW |