| Index: components/dom_distiller/ios/distiller_page_ios.h
|
| diff --git a/components/dom_distiller/ios/distiller_page_ios.h b/components/dom_distiller/ios/distiller_page_ios.h
|
| index ddd55f31954c92a83aa7b78bcc8dc27b34e64af5..d9a26658f16890f9867d167d6f75f1d38d903be2 100644
|
| --- a/components/dom_distiller/ios/distiller_page_ios.h
|
| +++ b/components/dom_distiller/ios/distiller_page_ios.h
|
| @@ -10,7 +10,6 @@
|
|
|
| #include "base/memory/weak_ptr.h"
|
| #include "components/dom_distiller/core/distiller_page.h"
|
| -#include "components/dom_distiller/ios/favicon_web_state_dispatcher.h"
|
| #include "ios/web/public/web_state/web_state_observer.h"
|
| #include "url/gurl.h"
|
|
|
| @@ -22,19 +21,22 @@ class DistillerWebStateObserver;
|
| // content.
|
| class DistillerPageIOS : public DistillerPage {
|
| public:
|
| - explicit DistillerPageIOS(FaviconWebStateDispatcher* web_state_dispatcher);
|
| + explicit DistillerPageIOS(std::unique_ptr<web::WebState> web_state);
|
| ~DistillerPageIOS() override;
|
|
|
| protected:
|
| bool StringifyOutput() override;
|
| void DistillPageImpl(const GURL& url, const std::string& script) override;
|
|
|
| - private:
|
| - friend class DistillerWebStateObserver;
|
| + std::unique_ptr<web::WebState> ReplaceWebState(
|
| + std::unique_ptr<web::WebState> web_state);
|
|
|
| // Called by |web_state_observer_| once the page has finished loading.
|
| - void OnLoadURLDone(web::PageLoadCompletionStatus load_completion_status);
|
| + virtual void OnLoadURLDone(
|
| + web::PageLoadCompletionStatus load_completion_status);
|
|
|
| + private:
|
| + friend class DistillerWebStateObserver;
|
| // Called once the |script_| has been evaluated on the page.
|
| void HandleJavaScriptResult(id result);
|
|
|
| @@ -43,8 +45,7 @@ class DistillerPageIOS : public DistillerPage {
|
|
|
| GURL url_;
|
| std::string script_;
|
| - web::WebState* web_state_;
|
| - FaviconWebStateDispatcher* web_state_dispatcher_;
|
| + std::unique_ptr<web::WebState> web_state_;
|
| std::unique_ptr<DistillerWebStateObserver> web_state_observer_;
|
| base::WeakPtrFactory<DistillerPageIOS> weak_ptr_factory_;
|
| };
|
|
|