| Index: components/dom_distiller/ios/distiller_page_factory_ios.mm
|
| diff --git a/components/dom_distiller/ios/distiller_page_factory_ios.mm b/components/dom_distiller/ios/distiller_page_factory_ios.mm
|
| index 1e3f7f45238f3f4dc59f6d60c17dec3d26e058fc..d3ae1f2bdcfd8c8d9cd51955fd7c0a64a3948eb1 100644
|
| --- a/components/dom_distiller/ios/distiller_page_factory_ios.mm
|
| +++ b/components/dom_distiller/ios/distiller_page_factory_ios.mm
|
| @@ -6,26 +6,32 @@
|
|
|
| #include "base/memory/ptr_util.h"
|
| #include "components/dom_distiller/ios/distiller_page_ios.h"
|
| -#include "components/dom_distiller/ios/favicon_web_state_dispatcher.h"
|
| #include "ios/web/public/browser_state.h"
|
| +#include "ios/web/public/web_state/web_state.h"
|
|
|
| namespace dom_distiller {
|
|
|
| DistillerPageFactoryIOS::DistillerPageFactoryIOS(
|
| - std::unique_ptr<FaviconWebStateDispatcher> web_state_dispatcher)
|
| - : web_state_dispatcher_(std::move(web_state_dispatcher)) {}
|
| + web::BrowserState* browser_state)
|
| + : browser_state_(browser_state) {}
|
|
|
| DistillerPageFactoryIOS::~DistillerPageFactoryIOS() {}
|
|
|
| std::unique_ptr<DistillerPage> DistillerPageFactoryIOS::CreateDistillerPage(
|
| const gfx::Size& view_size) const {
|
| - return base::MakeUnique<DistillerPageIOS>(web_state_dispatcher_.get());
|
| + const web::WebState::CreateParams web_state_create_params(browser_state_);
|
| + std::unique_ptr<web::WebState> web_state_unique =
|
| + web::WebState::Create(web_state_create_params);
|
| + return base::MakeUnique<DistillerPageIOS>(std::move(web_state_unique));
|
| }
|
|
|
| std::unique_ptr<DistillerPage>
|
| DistillerPageFactoryIOS::CreateDistillerPageWithHandle(
|
| std::unique_ptr<SourcePageHandle> handle) const {
|
| - return base::MakeUnique<DistillerPageIOS>(web_state_dispatcher_.get());
|
| + const web::WebState::CreateParams web_state_create_params(browser_state_);
|
| + std::unique_ptr<web::WebState> web_state_unique =
|
| + web::WebState::Create(web_state_create_params);
|
| + return base::MakeUnique<DistillerPageIOS>(std::move(web_state_unique));
|
| }
|
|
|
| } // namespace dom_distiller
|
|
|