OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 IOS_CHROME_BROWSER_UI_PRELOAD_CONTROLLER_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_PRELOAD_CONTROLLER_H_ |
6 #define IOS_CHROME_BROWSER_UI_PRELOAD_CONTROLLER_H_ | 6 #define IOS_CHROME_BROWSER_UI_PRELOAD_CONTROLLER_H_ |
7 | 7 |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 PrefObserverDelegate, | 44 PrefObserverDelegate, |
45 PreloadProvider, | 45 PreloadProvider, |
46 TabDelegate, | 46 TabDelegate, |
47 CRConnectionTypeObserverBridge> | 47 CRConnectionTypeObserverBridge> |
48 // The URL of the currently prerendered Tab. Empty if there is no prerendered | 48 // The URL of the currently prerendered Tab. Empty if there is no prerendered |
49 // Tab. | 49 // Tab. |
50 @property(nonatomic, readonly, assign) GURL prerenderedURL; | 50 @property(nonatomic, readonly, assign) GURL prerenderedURL; |
51 // The URL of the currently prefetched content. Empty if there is no prefetched | 51 // The URL of the currently prefetched content. Empty if there is no prefetched |
52 // content. | 52 // content. |
53 @property(nonatomic, readonly, assign) GURL prefetchedURL; | 53 @property(nonatomic, readonly, assign) GURL prefetchedURL; |
54 @property(nonatomic, assign) id<PreloadControllerDelegate> delegate; | 54 @property(nonatomic, unsafe_unretained) id<PreloadControllerDelegate> delegate; |
sdefresne
2017/04/06 11:23:45
Can't this be weak?
stkhapugin
2017/04/07 13:02:09
Done. Thank you for pointing this out!
| |
55 | 55 |
56 // Designated initializer. | 56 // Designated initializer. |
57 - (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState; | 57 - (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState; |
58 | 58 |
59 // Called when the browser state this object was initialized with is being | 59 // Called when the browser state this object was initialized with is being |
60 // destroyed. | 60 // destroyed. |
61 - (void)browserStateDestroyed; | 61 - (void)browserStateDestroyed; |
62 | 62 |
63 // Returns the currently prerendered WebState, or nil if none exists. After | 63 // Returns the currently prerendered WebState, or nil if none exists. After |
64 // this method is called, the PrerenderController reverts to a non-prerendering | 64 // this method is called, the PrerenderController reverts to a non-prerendering |
65 // state. | 65 // state. |
66 - (std::unique_ptr<web::WebState>)releasePrerenderContents; | 66 - (std::unique_ptr<web::WebState>)releasePrerenderContents; |
67 | 67 |
68 // Returns true if the content of |url| has been prefetched. | 68 // Returns true if the content of |url| has been prefetched. |
69 - (BOOL)hasPrefetchedURL:(const GURL&)url; | 69 - (BOOL)hasPrefetchedURL:(const GURL&)url; |
70 @end | 70 @end |
71 | 71 |
72 #endif // IOS_CHROME_BROWSER_UI_PRELOAD_CONTROLLER_H_ | 72 #endif // IOS_CHROME_BROWSER_UI_PRELOAD_CONTROLLER_H_ |
OLD | NEW |