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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 // Navigates to the item at the given |index|. | 184 // Navigates to the item at the given |index|. |
185 - (void)goToItemAtIndex:(int)index; | 185 - (void)goToItemAtIndex:(int)index; |
186 | 186 |
187 // Executes |script| in the web view, registering user interaction. | 187 // Executes |script| in the web view, registering user interaction. |
188 - (void)executeUserJavaScript:(NSString*)script | 188 - (void)executeUserJavaScript:(NSString*)script |
189 completionHandler:(web::JavaScriptResultBlock)completion; | 189 completionHandler:(web::JavaScriptResultBlock)completion; |
190 | 190 |
191 // Dismisses the soft keyboard. | 191 // Dismisses the soft keyboard. |
192 - (void)dismissKeyboard; | 192 - (void)dismissKeyboard; |
193 | 193 |
| 194 // Requires that the next load rebuild the UIWebView. This is expensive, and |
| 195 // should be used only in the case where something has changed that UIWebView |
| 196 // only checks on creation, such that the whole object needs to be rebuilt. |
| 197 // TODO(stuartmorgan): Merge this and reinitializeWebViewAndReload:. They are |
| 198 // currently subtly different in terms of implementation, but are for |
| 199 // fundamentally the same purpose. |
| 200 - (void)requirePageReconstruction; |
| 201 |
194 - (void)reinitializeWebViewAndReload:(BOOL)reload; | 202 - (void)reinitializeWebViewAndReload:(BOOL)reload; |
195 | 203 |
196 // Requires that the next display reload the page, using a placeholder while | 204 // Requires that the next display reload the page, using a placeholder while |
197 // loading. This could be used, e.g., to handle a crash in a WebController that | 205 // loading. This could be used, e.g., to handle a crash in a WebController that |
198 // is not currently visible. | 206 // is not currently visible. |
199 // TODO(stuartmorgan): When revisiting the methods above, revisit this as well. | 207 // TODO(stuartmorgan): When revisiting the methods above, revisit this as well. |
200 - (void)requirePageReload; | 208 - (void)requirePageReload; |
201 | 209 |
202 // Show overlay, don't reload web page. Used when the view will be | 210 // Show overlay, don't reload web page. Used when the view will be |
203 // visible only briefly (e.g., tablet side swipe). | 211 // visible only briefly (e.g., tablet side swipe). |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 | 302 |
295 // Acts on a single message from the JS object, parsed from JSON into a | 303 // Acts on a single message from the JS object, parsed from JSON into a |
296 // DictionaryValue. Returns NO if the format for the message was invalid. | 304 // DictionaryValue. Returns NO if the format for the message was invalid. |
297 - (BOOL)respondToMessage:(base::DictionaryValue*)crwMessage | 305 - (BOOL)respondToMessage:(base::DictionaryValue*)crwMessage |
298 userIsInteracting:(BOOL)userIsInteracting | 306 userIsInteracting:(BOOL)userIsInteracting |
299 originURL:(const GURL&)originURL; | 307 originURL:(const GURL&)originURL; |
300 | 308 |
301 @end | 309 @end |
302 | 310 |
303 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ | 311 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ |
OLD | NEW |