| 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_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ | 5 #ifndef IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ |
| 6 #define IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ | 6 #define IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 | 9 |
| 10 #import "ios/web/net/crw_request_tracker_delegate.h" | 10 #import "ios/web/net/crw_request_tracker_delegate.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // next creation. | 95 // next creation. |
| 96 @property(nonatomic, readwrite, assign) BOOL usePlaceholderOverlay; | 96 @property(nonatomic, readwrite, assign) BOOL usePlaceholderOverlay; |
| 97 | 97 |
| 98 // Returns the current page loading phase. | 98 // Returns the current page loading phase. |
| 99 @property(nonatomic, readonly) web::LoadPhase loadPhase; | 99 @property(nonatomic, readonly) web::LoadPhase loadPhase; |
| 100 | 100 |
| 101 // The fraction of the page load that has completed as a number between 0.0 | 101 // The fraction of the page load that has completed as a number between 0.0 |
| 102 // (nothing loaded) and 1.0 (fully loaded). | 102 // (nothing loaded) and 1.0 (fully loaded). |
| 103 @property(nonatomic, readonly) double loadingProgress; | 103 @property(nonatomic, readonly) double loadingProgress; |
| 104 | 104 |
| 105 // Returns whether the page can navigate backwards or forwards. | |
| 106 @property(nonatomic, readonly) BOOL canGoBack; | |
| 107 @property(nonatomic, readonly) BOOL canGoForward; | |
| 108 | |
| 109 // Returns the x, y offset the content has been scrolled. | 105 // Returns the x, y offset the content has been scrolled. |
| 110 @property(nonatomic, readonly) CGPoint scrollPosition; | 106 @property(nonatomic, readonly) CGPoint scrollPosition; |
| 111 | 107 |
| 112 // Returns whether the top of the content is visible. | 108 // Returns whether the top of the content is visible. |
| 113 @property(nonatomic, readonly) BOOL atTop; | 109 @property(nonatomic, readonly) BOOL atTop; |
| 114 | 110 |
| 115 // YES if JavaScript dialogs, HTTP authentication dialogs and window.open | 111 // YES if JavaScript dialogs, HTTP authentication dialogs and window.open |
| 116 // calls should be suppressed. Default is NO. When dialog is suppressed | 112 // calls should be suppressed. Default is NO. When dialog is suppressed |
| 117 // |CRWWebDelegate webControllerDidSuppressDialog:| will be called. | 113 // |CRWWebDelegate webControllerDidSuppressDialog:| will be called. |
| 118 @property(nonatomic, assign) BOOL shouldSuppressDialogs; | 114 @property(nonatomic, assign) BOOL shouldSuppressDialogs; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 // Stops loading the page. | 184 // Stops loading the page. |
| 189 - (void)stopLoading; | 185 - (void)stopLoading; |
| 190 | 186 |
| 191 // Causes the page to start loading immediately if there is a pending load; | 187 // Causes the page to start loading immediately if there is a pending load; |
| 192 // normally if the web view has been paged out for memory reasons, loads are | 188 // normally if the web view has been paged out for memory reasons, loads are |
| 193 // started lazily the next time the view is displayed. This can be called to | 189 // started lazily the next time the view is displayed. This can be called to |
| 194 // bypass the lazy behavior. This is equivalent to calling -view, but should be | 190 // bypass the lazy behavior. This is equivalent to calling -view, but should be |
| 195 // used when deliberately pre-triggering a load without displaying. | 191 // used when deliberately pre-triggering a load without displaying. |
| 196 - (void)triggerPendingLoad; | 192 - (void)triggerPendingLoad; |
| 197 | 193 |
| 198 // Navigate forwards or backwards by one page. | |
| 199 - (void)goBack; | |
| 200 - (void)goForward; | |
| 201 // Navigates forwards or backwards by |delta| pages. No-op if delta is out of | 194 // Navigates forwards or backwards by |delta| pages. No-op if delta is out of |
| 202 // bounds. | 195 // bounds. |
| 203 - (void)goDelta:(int)delta; | 196 - (void)goDelta:(int)delta; |
| 204 // Navigates to the item at the given |index|. | 197 // Navigates to the item at the given |index|. |
| 205 - (void)goToItemAtIndex:(int)index; | 198 - (void)goToItemAtIndex:(int)index; |
| 206 | 199 |
| 207 // Executes |script| in the web view, registering user interaction. | 200 // Executes |script| in the web view, registering user interaction. |
| 208 - (void)executeUserJavaScript:(NSString*)script | 201 - (void)executeUserJavaScript:(NSString*)script |
| 209 completionHandler:(web::JavaScriptResultBlock)completion; | 202 completionHandler:(web::JavaScriptResultBlock)completion; |
| 210 | 203 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 | 308 |
| 316 // Acts on a single message from the JS object, parsed from JSON into a | 309 // Acts on a single message from the JS object, parsed from JSON into a |
| 317 // DictionaryValue. Returns NO if the format for the message was invalid. | 310 // DictionaryValue. Returns NO if the format for the message was invalid. |
| 318 - (BOOL)respondToMessage:(base::DictionaryValue*)crwMessage | 311 - (BOOL)respondToMessage:(base::DictionaryValue*)crwMessage |
| 319 userIsInteracting:(BOOL)userIsInteracting | 312 userIsInteracting:(BOOL)userIsInteracting |
| 320 originURL:(const GURL&)originURL; | 313 originURL:(const GURL&)originURL; |
| 321 | 314 |
| 322 @end | 315 @end |
| 323 | 316 |
| 324 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ | 317 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ |
| OLD | NEW |