| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // TODO(stuartmorgan): Move all of the navigation APIs out of this class. | 65 // TODO(stuartmorgan): Move all of the navigation APIs out of this class. |
| 66 @interface CRWWebController : NSObject<CRWJSInjectionEvaluator, | 66 @interface CRWWebController : NSObject<CRWJSInjectionEvaluator, |
| 67 CRWRequestTrackerDelegate, | 67 CRWRequestTrackerDelegate, |
| 68 CRWTouchTrackingDelegate, | 68 CRWTouchTrackingDelegate, |
| 69 UIGestureRecognizerDelegate> | 69 UIGestureRecognizerDelegate> |
| 70 | 70 |
| 71 // Whether or not a UIWebView is allowed to exist in this CRWWebController. | 71 // Whether or not a UIWebView is allowed to exist in this CRWWebController. |
| 72 // Defaults to NO; this should be enabled before attempting to access the view. | 72 // Defaults to NO; this should be enabled before attempting to access the view. |
| 73 @property(nonatomic, assign) BOOL webUsageEnabled; | 73 @property(nonatomic, assign) BOOL webUsageEnabled; |
| 74 | 74 |
| 75 @property(nonatomic, weak) id<CRWWebDelegate> delegate; | 75 @property(nonatomic, assign) id<CRWWebDelegate> delegate; |
| 76 @property(nonatomic, weak) id<CRWWebUserInterfaceDelegate> UIDelegate; | 76 @property(nonatomic, weak) id<CRWWebUserInterfaceDelegate> UIDelegate; |
| 77 @property(nonatomic, weak) id<CRWNativeContentProvider> nativeProvider; | 77 @property(nonatomic, assign) id<CRWNativeContentProvider> nativeProvider; |
| 78 @property(nonatomic, weak) id<CRWSwipeRecognizerProvider> | 78 @property(nonatomic, assign) |
| 79 swipeRecognizerProvider; | 79 id<CRWSwipeRecognizerProvider> swipeRecognizerProvider; |
| 80 @property(nonatomic, readonly) web::WebState* webState; | 80 @property(nonatomic, readonly) web::WebState* webState; |
| 81 @property(nonatomic, readonly) web::WebStateImpl* webStateImpl; | 81 @property(nonatomic, readonly) web::WebStateImpl* webStateImpl; |
| 82 | 82 |
| 83 // The container view used to display content. If the view has been purged due | 83 // The container view used to display content. If the view has been purged due |
| 84 // to low memory, this will recreate it. | 84 // to low memory, this will recreate it. |
| 85 @property(nonatomic, strong, readonly) UIView* view; | 85 @property(nonatomic, readonly) UIView* view; |
| 86 | 86 |
| 87 // The web view proxy associated with this controller. | 87 // The web view proxy associated with this controller. |
| 88 @property(nonatomic, strong, readonly) id<CRWWebViewProxy> webViewProxy; | 88 @property(nonatomic, readonly) id<CRWWebViewProxy> webViewProxy; |
| 89 | 89 |
| 90 // The view that generates print data when printing. It is nil if printing | 90 // The view that generates print data when printing. It is nil if printing |
| 91 // is not supported. | 91 // is not supported. |
| 92 @property(nonatomic, strong, readonly) UIView* viewForPrinting; | 92 @property(nonatomic, readonly) UIView* viewForPrinting; |
| 93 | 93 |
| 94 // Content view was reset due to low memory. Use placeholder overlay view on | 94 // Content view was reset due to low memory. Use placeholder overlay view on |
| 95 // next creation. | 95 // next creation. |
| 96 @property(nonatomic, 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, assign) 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. | 105 // Returns whether the page can navigate backwards or forwards. |
| 106 @property(nonatomic, readonly) BOOL canGoBack; | 106 @property(nonatomic, readonly) BOOL canGoBack; |
| 107 @property(nonatomic, readonly) BOOL canGoForward; | 107 @property(nonatomic, readonly) BOOL canGoForward; |
| 108 | 108 |
| 109 // Returns the x, y offset the content has been scrolled. | 109 // Returns the x, y offset the content has been scrolled. |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 | 320 |
| 321 // Acts on a single message from the JS object, parsed from JSON into a | 321 // Acts on a single message from the JS object, parsed from JSON into a |
| 322 // DictionaryValue. Returns NO if the format for the message was invalid. | 322 // DictionaryValue. Returns NO if the format for the message was invalid. |
| 323 - (BOOL)respondToMessage:(base::DictionaryValue*)crwMessage | 323 - (BOOL)respondToMessage:(base::DictionaryValue*)crwMessage |
| 324 userIsInteracting:(BOOL)userIsInteracting | 324 userIsInteracting:(BOOL)userIsInteracting |
| 325 originURL:(const GURL&)originURL; | 325 originURL:(const GURL&)originURL; |
| 326 | 326 |
| 327 @end | 327 @end |
| 328 | 328 |
| 329 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ | 329 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ |
| OLD | NEW |