| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // Tab. | 103 // Tab. |
| 104 @property(nonatomic, readonly, assign) GURL prerenderedURL; | 104 @property(nonatomic, readonly, assign) GURL prerenderedURL; |
| 105 // The URL of the currently prefetched content. Empty if there is no prefetched | 105 // The URL of the currently prefetched content. Empty if there is no prefetched |
| 106 // content. | 106 // content. |
| 107 @property(nonatomic, readonly, assign) GURL prefetchedURL; | 107 @property(nonatomic, readonly, assign) GURL prefetchedURL; |
| 108 @property(nonatomic, assign) id<PreloadControllerDelegate> delegate; | 108 @property(nonatomic, assign) id<PreloadControllerDelegate> delegate; |
| 109 | 109 |
| 110 // Designated initializer. | 110 // Designated initializer. |
| 111 - (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState; | 111 - (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState; |
| 112 | 112 |
| 113 // Called when the browser state this object was initialized with is being |
| 114 // destroyed. |
| 115 - (void)browserStateDestroyed; |
| 116 |
| 113 // Returns the currently prerendered Tab, or nil if none exists. The caller | 117 // Returns the currently prerendered Tab, or nil if none exists. The caller |
| 114 // must retain the returned Tab if needed. After this method is called, the | 118 // must retain the returned Tab if needed. After this method is called, the |
| 115 // PrerenderController reverts to a non-prerendering state. | 119 // PrerenderController reverts to a non-prerendering state. |
| 116 - (Tab*)releasePrerenderContents; | 120 - (Tab*)releasePrerenderContents; |
| 117 | 121 |
| 118 // Returns true if the content of |url| has been prefetched. | 122 // Returns true if the content of |url| has been prefetched. |
| 119 - (BOOL)hasPrefetchedURL:(const GURL&)url; | 123 - (BOOL)hasPrefetchedURL:(const GURL&)url; |
| 120 @end | 124 @end |
| 121 | 125 |
| 122 #endif // IOS_CHROME_BROWSER_UI_PRELOAD_CONTROLLER_H_ | 126 #endif // IOS_CHROME_BROWSER_UI_PRELOAD_CONTROLLER_H_ |
| OLD | NEW |