OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/dom_distiller/ios/distiller_page_factory_ios.h" | 5 #include "components/dom_distiller/ios/distiller_page_factory_ios.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "components/dom_distiller/ios/distiller_page_ios.h" | 8 #include "components/dom_distiller/ios/distiller_page_ios.h" |
9 #include "components/dom_distiller/ios/web_state_pool.h" | |
9 #include "ios/web/public/browser_state.h" | 10 #include "ios/web/public/browser_state.h" |
11 #include "ios/web/public/web_state/web_state.h" | |
Eugene But (OOO till 7-30)
2016/12/12 16:15:49
s/include/import
| |
10 | 12 |
11 namespace dom_distiller { | 13 namespace dom_distiller { |
12 | 14 |
13 DistillerPageFactoryIOS::DistillerPageFactoryIOS( | 15 DistillerPageFactoryIOS::DistillerPageFactoryIOS( |
14 web::BrowserState* browser_state) | 16 |
15 : browser_state_(browser_state) { | 17 std::unique_ptr<WebStatePool> web_state_pool) |
16 } | 18 : web_state_pool_(std::move(web_state_pool)) {} |
17 | 19 |
18 std::unique_ptr<DistillerPage> DistillerPageFactoryIOS::CreateDistillerPage( | 20 std::unique_ptr<DistillerPage> DistillerPageFactoryIOS::CreateDistillerPage( |
19 const gfx::Size& view_size) const { | 21 const gfx::Size& view_size) const { |
20 return base::WrapUnique<DistillerPage>(new DistillerPageIOS(browser_state_)); | 22 return base::WrapUnique<DistillerPage>( |
23 new DistillerPageIOS(web_state_pool_.get())); | |
21 } | 24 } |
25 DistillerPageFactoryIOS::~DistillerPageFactoryIOS() {} | |
22 | 26 |
23 std::unique_ptr<DistillerPage> | 27 std::unique_ptr<DistillerPage> |
24 DistillerPageFactoryIOS::CreateDistillerPageWithHandle( | 28 DistillerPageFactoryIOS::CreateDistillerPageWithHandle( |
25 std::unique_ptr<SourcePageHandle> handle) const { | 29 std::unique_ptr<SourcePageHandle> handle) const { |
26 return base::WrapUnique<DistillerPage>(new DistillerPageIOS(browser_state_)); | 30 return base::WrapUnique<DistillerPage>( |
31 new DistillerPageIOS(web_state_pool_.get())); | |
27 } | 32 } |
28 | 33 |
29 } // namespace dom_distiller | 34 } // namespace dom_distiller |
OLD | NEW |