| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PUBLIC_WEB_STATE_CRW_WEB_VIEW_SCROLL_VIEW_PROXY_H_ | 5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_CRW_WEB_VIEW_SCROLL_VIEW_PROXY_H_ |
| 6 #define IOS_WEB_PUBLIC_WEB_STATE_CRW_WEB_VIEW_SCROLL_VIEW_PROXY_H_ | 6 #define IOS_WEB_PUBLIC_WEB_STATE_CRW_WEB_VIEW_SCROLL_VIEW_PROXY_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 | 9 |
| 10 @protocol CRWWebViewScrollViewProxyObserver; | 10 @protocol CRWWebViewScrollViewProxyObserver; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 @interface CRWWebViewScrollViewProxy : NSObject<UIScrollViewDelegate> | 24 @interface CRWWebViewScrollViewProxy : NSObject<UIScrollViewDelegate> |
| 25 @property(nonatomic, assign) CGPoint contentOffset; | 25 @property(nonatomic, assign) CGPoint contentOffset; |
| 26 @property(nonatomic, assign) UIEdgeInsets contentInset; | 26 @property(nonatomic, assign) UIEdgeInsets contentInset; |
| 27 @property(nonatomic, readonly) BOOL isZooming; | 27 @property(nonatomic, readonly) BOOL isZooming; |
| 28 @property(nonatomic, readonly) CGFloat zoomScale; | 28 @property(nonatomic, readonly) CGFloat zoomScale; |
| 29 @property(nonatomic, assign) UIEdgeInsets scrollIndicatorInsets; | 29 @property(nonatomic, assign) UIEdgeInsets scrollIndicatorInsets; |
| 30 @property(nonatomic, assign) CGSize contentSize; | 30 @property(nonatomic, assign) CGSize contentSize; |
| 31 @property(nonatomic, readonly) CGRect frame; | 31 @property(nonatomic, readonly) CGRect frame; |
| 32 @property(nonatomic, getter=isScrollEnabled) BOOL scrollEnabled; | 32 @property(nonatomic, getter=isScrollEnabled) BOOL scrollEnabled; |
| 33 @property(nonatomic, assign) BOOL bounces; | 33 @property(nonatomic, assign) BOOL bounces; |
| 34 @property(nonatomic, readonly) UIPanGestureRecognizer* panGestureRecognizer; | 34 @property(weak, nonatomic, readonly) |
| 35 UIPanGestureRecognizer* panGestureRecognizer; |
| 35 // Returns the scrollview's gesture recognizers. | 36 // Returns the scrollview's gesture recognizers. |
| 36 @property(nonatomic, readonly) NSArray* gestureRecognizers; | 37 @property(weak, nonatomic, readonly) NSArray* gestureRecognizers; |
| 37 | 38 |
| 38 // Calls UIScrollView's implementation of setContentInset: directly. This | 39 // Calls UIScrollView's implementation of setContentInset: directly. This |
| 39 // bypasses a very slow update path in UIWebView. | 40 // bypasses a very slow update path in UIWebView. |
| 40 - (void)setContentInsetFast:(UIEdgeInsets)contentInset; | 41 - (void)setContentInsetFast:(UIEdgeInsets)contentInset; |
| 41 | 42 |
| 42 - (void)addGestureRecognizer:(UIGestureRecognizer*)gestureRecognizer; | 43 - (void)addGestureRecognizer:(UIGestureRecognizer*)gestureRecognizer; |
| 43 - (void)removeGestureRecognizer:(UIGestureRecognizer*)gestureRecognizer; | 44 - (void)removeGestureRecognizer:(UIGestureRecognizer*)gestureRecognizer; |
| 44 - (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated; | 45 - (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated; |
| 45 | 46 |
| 46 // Used by the CRWWebViewProxy to set the UIScrollView to be managed. | 47 // Used by the CRWWebViewProxy to set the UIScrollView to be managed. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // It inherit from CRWWebViewScrollViewScrollViewObserver which only implements | 89 // It inherit from CRWWebViewScrollViewScrollViewObserver which only implements |
| 89 // methods for listening to scrollview changes. | 90 // methods for listening to scrollview changes. |
| 90 @protocol CRWWebViewScrollViewProxyObserver<CRWWebViewScrollViewObserver> | 91 @protocol CRWWebViewScrollViewProxyObserver<CRWWebViewScrollViewObserver> |
| 91 @optional | 92 @optional |
| 92 // Called when the underlying scrollview of the proxy is set. | 93 // Called when the underlying scrollview of the proxy is set. |
| 93 - (void)webViewScrollViewProxyDidSetScrollView: | 94 - (void)webViewScrollViewProxyDidSetScrollView: |
| 94 (CRWWebViewScrollViewProxy*)webViewScrollViewProxy; | 95 (CRWWebViewScrollViewProxy*)webViewScrollViewProxy; |
| 95 @end | 96 @end |
| 96 | 97 |
| 97 #endif // IOS_WEB_PUBLIC_WEB_STATE_CRW_WEB_VIEW_SCROLL_VIEW_PROXY_H_ | 98 #endif // IOS_WEB_PUBLIC_WEB_STATE_CRW_WEB_VIEW_SCROLL_VIEW_PROXY_H_ |
| OLD | NEW |