| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 | 246 |
| 247 // Removes an attached CRWWebControllerObserver. | 247 // Removes an attached CRWWebControllerObserver. |
| 248 - (void)removeObserver:(id<CRWWebControllerObserver>)observer; | 248 - (void)removeObserver:(id<CRWWebControllerObserver>)observer; |
| 249 | 249 |
| 250 // Returns the always-visible frame, not including the part that could be | 250 // Returns the always-visible frame, not including the part that could be |
| 251 // covered by the toolbar. | 251 // covered by the toolbar. |
| 252 - (CGRect)visibleFrame; | 252 - (CGRect)visibleFrame; |
| 253 | 253 |
| 254 - (CRWJSInjectionReceiver*)jsInjectionReceiver; | 254 - (CRWJSInjectionReceiver*)jsInjectionReceiver; |
| 255 | 255 |
| 256 // Load the correct HTML page for |error| in a native controller, retrieved | |
| 257 // from the native provider. Call |loadNativeViewWithSuccess:NO| to load the | |
| 258 // native controller. | |
| 259 - (void)loadErrorInNativeView:(NSError*)error; | |
| 260 | |
| 261 // Returns the native controller (if any) current mananging the content. | 256 // Returns the native controller (if any) current mananging the content. |
| 262 - (id<CRWNativeContent>)nativeController; | 257 - (id<CRWNativeContent>)nativeController; |
| 263 @end | 258 @end |
| 264 | 259 |
| 265 #pragma mark Testing | 260 #pragma mark Testing |
| 266 | 261 |
| 267 @interface CRWWebController (UsedOnlyForTesting) // Testing or internal API. | 262 @interface CRWWebController (UsedOnlyForTesting) // Testing or internal API. |
| 268 | 263 |
| 269 // Returns whether the user is interacting with the page. | 264 // Returns whether the user is interacting with the page. |
| 270 @property(nonatomic, readonly) BOOL userIsInteracting; | 265 @property(nonatomic, readonly) BOOL userIsInteracting; |
| 271 | 266 |
| 272 // Injects a CRWWebViewContentView for testing. Takes ownership of | 267 // Injects a CRWWebViewContentView for testing. Takes ownership of |
| 273 // |webViewContentView|. | 268 // |webViewContentView|. |
| 274 - (void)injectWebViewContentView:(CRWWebViewContentView*)webViewContentView; | 269 - (void)injectWebViewContentView:(CRWWebViewContentView*)webViewContentView; |
| 275 - (void)resetInjectedWebViewContentView; | 270 - (void)resetInjectedWebViewContentView; |
| 276 | 271 |
| 277 // Returns the number of observers registered for this CRWWebController. | 272 // Returns the number of observers registered for this CRWWebController. |
| 278 - (NSUInteger)observerCount; | 273 - (NSUInteger)observerCount; |
| 279 | 274 |
| 280 // Loads the HTML into the page at the given URL. | 275 // Loads the HTML into the page at the given URL. |
| 281 - (void)loadHTML:(NSString*)HTML forURL:(const GURL&)URL; | 276 - (void)loadHTML:(NSString*)HTML forURL:(const GURL&)URL; |
| 282 | 277 |
| 283 @end | 278 @end |
| 284 | 279 |
| 285 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ | 280 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ |
| OLD | NEW |