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 #ifndef COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_FACTORY_IOS_H_ | 5 #ifndef COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_FACTORY_IOS_H_ |
6 #define COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_FACTORY_IOS_H_ | 6 #define COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_FACTORY_IOS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "components/dom_distiller/core/distiller_page.h" | 10 #include "components/dom_distiller/core/distiller_page.h" |
11 | 11 |
12 namespace web { | 12 namespace dom_distiller { |
13 class BrowserState; | |
14 } | |
15 | 13 |
16 namespace dom_distiller { | 14 class WebStatePool; |
17 | 15 |
18 // DistillerPageFactoryIOS is an iOS-specific implementation of the | 16 // DistillerPageFactoryIOS is an iOS-specific implementation of the |
19 // DistillerPageFactory interface allowing the creation of DistillerPage | 17 // DistillerPageFactory interface allowing the creation of DistillerPage |
20 // instances. | 18 // instances. |
21 class DistillerPageFactoryIOS : public DistillerPageFactory { | 19 class DistillerPageFactoryIOS : public DistillerPageFactory { |
22 public: | 20 public: |
23 DistillerPageFactoryIOS(web::BrowserState* browser_state); | 21 DistillerPageFactoryIOS(std::unique_ptr<WebStatePool> web_state_pool); |
| 22 ~DistillerPageFactoryIOS() override; |
24 | 23 |
25 // Implementation of DistillerPageFactory: | 24 // Implementation of DistillerPageFactory: |
26 std::unique_ptr<DistillerPage> CreateDistillerPage( | 25 std::unique_ptr<DistillerPage> CreateDistillerPage( |
27 const gfx::Size& view_size) const override; | 26 const gfx::Size& view_size) const override; |
28 std::unique_ptr<DistillerPage> CreateDistillerPageWithHandle( | 27 std::unique_ptr<DistillerPage> CreateDistillerPageWithHandle( |
29 std::unique_ptr<SourcePageHandle> handle) const override; | 28 std::unique_ptr<SourcePageHandle> handle) const override; |
30 | 29 |
31 private: | 30 private: |
32 web::BrowserState* browser_state_; | 31 std::unique_ptr<WebStatePool> web_state_pool_; |
33 }; | 32 }; |
34 | 33 |
35 } // namespace dom_distiller | 34 } // namespace dom_distiller |
36 | 35 |
37 #endif // COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_FACTORY_IOS_H_ | 36 #endif // COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_FACTORY_IOS_H_ |
OLD | NEW |