Chromium Code Reviews| 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 ad355f9cd18cb87eb9ae69dcf77277295a459681..c4d14029664f003f48ecbcc79ddfafc386ea983f 100644 |
| --- a/components/dom_distiller/ios/distiller_page_factory_ios.mm |
| +++ b/components/dom_distiller/ios/distiller_page_factory_ios.mm |
| @@ -6,24 +6,29 @@ |
| #include "base/memory/ptr_util.h" |
| #include "components/dom_distiller/ios/distiller_page_ios.h" |
| +#include "components/dom_distiller/ios/web_state_pool.h" |
| #include "ios/web/public/browser_state.h" |
| +#include "ios/web/public/web_state/web_state.h" |
|
Eugene But (OOO till 7-30)
2016/12/12 16:15:49
s/include/import
|
| namespace dom_distiller { |
| DistillerPageFactoryIOS::DistillerPageFactoryIOS( |
| - web::BrowserState* browser_state) |
| - : browser_state_(browser_state) { |
| -} |
| + |
| + std::unique_ptr<WebStatePool> web_state_pool) |
| + : web_state_pool_(std::move(web_state_pool)) {} |
| std::unique_ptr<DistillerPage> DistillerPageFactoryIOS::CreateDistillerPage( |
| const gfx::Size& view_size) const { |
| - return base::WrapUnique<DistillerPage>(new DistillerPageIOS(browser_state_)); |
| + return base::WrapUnique<DistillerPage>( |
| + new DistillerPageIOS(web_state_pool_.get())); |
| } |
| +DistillerPageFactoryIOS::~DistillerPageFactoryIOS() {} |
| std::unique_ptr<DistillerPage> |
| DistillerPageFactoryIOS::CreateDistillerPageWithHandle( |
| std::unique_ptr<SourcePageHandle> handle) const { |
| - return base::WrapUnique<DistillerPage>(new DistillerPageIOS(browser_state_)); |
| + return base::WrapUnique<DistillerPage>( |
| + new DistillerPageIOS(web_state_pool_.get())); |
| } |
| } // namespace dom_distiller |