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 <string> | 9 #include <string> |
9 | 10 |
10 #include "base/memory/scoped_ptr.h" | |
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 { |
(...skipping 21 matching lines...) Expand all Loading... |
42 | 42 |
43 // Called by |web_state_observer_| once the page has finished loading. | 43 // Called by |web_state_observer_| once the page has finished loading. |
44 void OnLoadURLDone(web::PageLoadCompletionStatus load_completion_status); | 44 void OnLoadURLDone(web::PageLoadCompletionStatus load_completion_status); |
45 | 45 |
46 // Called once the |script_| has been evaluated on the page. | 46 // Called once the |script_| has been evaluated on the page. |
47 void HandleJavaScriptResultString(NSString* result); | 47 void HandleJavaScriptResultString(NSString* result); |
48 | 48 |
49 web::BrowserState* browser_state_; | 49 web::BrowserState* browser_state_; |
50 GURL url_; | 50 GURL url_; |
51 std::string script_; | 51 std::string script_; |
52 scoped_ptr<ios::WebControllerProvider> provider_; | 52 std::unique_ptr<ios::WebControllerProvider> provider_; |
53 scoped_ptr<DistillerWebStateObserver> web_state_observer_; | 53 std::unique_ptr<DistillerWebStateObserver> web_state_observer_; |
54 base::WeakPtrFactory<DistillerPageIOS> weak_ptr_factory_; | 54 base::WeakPtrFactory<DistillerPageIOS> weak_ptr_factory_; |
55 }; | 55 }; |
56 | 56 |
57 } // namespace dom_distiller | 57 } // namespace dom_distiller |
58 | 58 |
59 #endif // COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_IOS_H_ | 59 #endif // COMPONENTS_DOM_DISTILLER_IOS_DISTILLER_PAGE_IOS_H_ |
OLD | NEW |