OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_IOS_H_ | 5 #ifndef COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_IOS_H_ |
6 #define COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_IOS_H_ | 6 #define COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_IOS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "components/dom_distiller/core/distiller_page.h" | 12 #include "components/dom_distiller/core/distiller_page.h" |
13 #include "ios/web/public/web_state/web_state_observer.h" | 13 #include "ios/web/public/web_state/web_state_observer.h" |
14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
15 | 15 |
16 namespace ios { | 16 namespace ios { |
17 class WebControllerProvider; | 17 class WebControllerProvider; |
18 } | 18 } |
19 | 19 |
20 namespace web { | 20 namespace web { |
21 class BrowserState; | 21 class BrowserState; |
22 class WebState; | |
23 } | 22 } |
24 | 23 |
25 namespace dom_distiller { | 24 namespace dom_distiller { |
26 | 25 |
27 class DistillerWebStateObserver; | 26 class DistillerWebStateObserver; |
28 | 27 |
29 // Loads URLs and injects JavaScript into a page, extracting the distilled page | 28 // Loads URLs and injects JavaScript into a page, extracting the distilled page |
30 // content. | 29 // content. |
31 class DistillerPageIOS : public DistillerPage { | 30 class DistillerPageIOS : public DistillerPage { |
32 public: | 31 public: |
(...skipping 20 matching lines...) Expand all Loading... |
53 GURL url_; | 52 GURL url_; |
54 std::string script_; | 53 std::string script_; |
55 std::unique_ptr<ios::WebControllerProvider> provider_; | 54 std::unique_ptr<ios::WebControllerProvider> provider_; |
56 std::unique_ptr<DistillerWebStateObserver> web_state_observer_; | 55 std::unique_ptr<DistillerWebStateObserver> web_state_observer_; |
57 base::WeakPtrFactory<DistillerPageIOS> weak_ptr_factory_; | 56 base::WeakPtrFactory<DistillerPageIOS> weak_ptr_factory_; |
58 }; | 57 }; |
59 | 58 |
60 } // namespace dom_distiller | 59 } // namespace dom_distiller |
61 | 60 |
62 #endif // COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_IOS_H_ | 61 #endif // COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_IOS_H_ |
OLD | NEW |