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 | |
202 - (void)reinitializeWebViewAndReload:(BOOL)reload; | 194 - (void)reinitializeWebViewAndReload:(BOOL)reload; |
203 | 195 |
204 // Requires that the next display reload the page, using a placeholder while | 196 // Requires that the next display reload the page, using a placeholder while |
205 // loading. This could be used, e.g., to handle a crash in a WebController that | 197 // loading. This could be used, e.g., to handle a crash in a WebController that |
206 // is not currently visible. | 198 // is not currently visible. |
207 // TODO(stuartmorgan): When revisiting the methods above, revisit this as well. | 199 // TODO(stuartmorgan): When revisiting the methods above, revisit this as well. |
208 - (void)requirePageReload; | 200 - (void)requirePageReload; |
209 | 201 |
210 // Show overlay, don't reload web page. Used when the view will be | 202 // Show overlay, don't reload web page. Used when the view will be |
211 // visible only briefly (e.g., tablet side swipe). | 203 // visible only briefly (e.g., tablet side swipe). |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 294 |
303 // Acts on a single message from the JS object, parsed from JSON into a | 295 // Acts on a single message from the JS object, parsed from JSON into a |
304 // DictionaryValue. Returns NO if the format for the message was invalid. | 296 // DictionaryValue. Returns NO if the format for the message was invalid. |
305 - (BOOL)respondToMessage:(base::DictionaryValue*)crwMessage | 297 - (BOOL)respondToMessage:(base::DictionaryValue*)crwMessage |
306 userIsInteracting:(BOOL)userIsInteracting | 298 userIsInteracting:(BOOL)userIsInteracting |
307 originURL:(const GURL&)originURL; | 299 originURL:(const GURL&)originURL; |
308 | 300 |
309 @end | 301 @end |
310 | 302 |
311 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ | 303 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ |
OLD | NEW |