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 23 matching lines...) Expand all Loading... |
34 @class CRWJSInjectionReceiver; | 34 @class CRWJSInjectionReceiver; |
35 @protocol CRWNativeContent; | 35 @protocol CRWNativeContent; |
36 @protocol CRWNativeContentProvider; | 36 @protocol CRWNativeContentProvider; |
37 @protocol CRWSwipeRecognizerProvider; | 37 @protocol CRWSwipeRecognizerProvider; |
38 @protocol CRWWebControllerObserver; | 38 @protocol CRWWebControllerObserver; |
39 @class CRWWebViewContentView; | 39 @class CRWWebViewContentView; |
40 @protocol CRWWebViewProxy; | 40 @protocol CRWWebViewProxy; |
41 class GURL; | 41 class GURL; |
42 | 42 |
43 namespace web { | 43 namespace web { |
| 44 class NavigationItemImpl; |
44 class WebState; | 45 class WebState; |
45 class WebStateImpl; | 46 class WebStateImpl; |
46 } | 47 } |
47 | 48 |
48 // Manages a view that can be used either for rendering web content in a web | 49 // Manages a view that can be used either for rendering web content in a web |
49 // view, or native content in a view provided by a NativeContentProvider. | 50 // view, or native content in a view provided by a NativeContentProvider. |
50 // CRWWebController also transparently evicts and restores the internal web | 51 // CRWWebController also transparently evicts and restores the internal web |
51 // view based on memory pressure, and manages access to interact with the | 52 // view based on memory pressure, and manages access to interact with the |
52 // web view. | 53 // web view. |
53 // This is an abstract class which must not be instantiated directly. | 54 // This is an abstract class which must not be instantiated directly. |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 - (void)simulateLoadRequestWithURL:(const GURL&)URL; | 289 - (void)simulateLoadRequestWithURL:(const GURL&)URL; |
289 | 290 |
290 // Returns the header height. | 291 // Returns the header height. |
291 - (CGFloat)headerHeight; | 292 - (CGFloat)headerHeight; |
292 | 293 |
293 // Loads the HTML into the page at the given URL. | 294 // Loads the HTML into the page at the given URL. |
294 - (void)loadHTML:(NSString*)HTML forURL:(const GURL&)URL; | 295 - (void)loadHTML:(NSString*)HTML forURL:(const GURL&)URL; |
295 | 296 |
296 // Caches request POST data in the given session entry. Exposed for testing. | 297 // Caches request POST data in the given session entry. Exposed for testing. |
297 - (void)cachePOSTDataForRequest:(NSURLRequest*)request | 298 - (void)cachePOSTDataForRequest:(NSURLRequest*)request |
298 inSessionEntry:(CRWSessionEntry*)currentSessionEntry; | 299 inNavigationItem:(web::NavigationItemImpl*)item; |
299 | 300 |
300 // Acts on a single message from the JS object, parsed from JSON into a | 301 // Acts on a single message from the JS object, parsed from JSON into a |
301 // DictionaryValue. Returns NO if the format for the message was invalid. | 302 // DictionaryValue. Returns NO if the format for the message was invalid. |
302 - (BOOL)respondToMessage:(base::DictionaryValue*)crwMessage | 303 - (BOOL)respondToMessage:(base::DictionaryValue*)crwMessage |
303 userIsInteracting:(BOOL)userIsInteracting | 304 userIsInteracting:(BOOL)userIsInteracting |
304 originURL:(const GURL&)originURL; | 305 originURL:(const GURL&)originURL; |
305 | 306 |
306 @end | 307 @end |
307 | 308 |
308 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ | 309 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ |
OLD | NEW |