| 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 18 matching lines...) Expand all Loading... |
| 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(weak, nonatomic, readonly) | 34 @property(weak, nonatomic, readonly) |
| 35 UIPanGestureRecognizer* panGestureRecognizer; | 35 UIPanGestureRecognizer* panGestureRecognizer; |
| 36 // Returns the scrollview's gesture recognizers. | 36 // Returns the scrollview's gesture recognizers. |
| 37 @property(weak, nonatomic, readonly) NSArray* gestureRecognizers; | 37 @property(weak, nonatomic, readonly) NSArray* gestureRecognizers; |
| 38 | 38 |
| 39 // Calls UIScrollView's implementation of setContentInset: directly. This | |
| 40 // bypasses a very slow update path in UIWebView. | |
| 41 - (void)setContentInsetFast:(UIEdgeInsets)contentInset; | |
| 42 | |
| 43 - (void)addGestureRecognizer:(UIGestureRecognizer*)gestureRecognizer; | 39 - (void)addGestureRecognizer:(UIGestureRecognizer*)gestureRecognizer; |
| 44 - (void)removeGestureRecognizer:(UIGestureRecognizer*)gestureRecognizer; | 40 - (void)removeGestureRecognizer:(UIGestureRecognizer*)gestureRecognizer; |
| 45 - (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated; | 41 - (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated; |
| 46 | 42 |
| 47 // Used by the CRWWebViewProxy to set the UIScrollView to be managed. | 43 // Used by the CRWWebViewProxy to set the UIScrollView to be managed. |
| 48 - (void)setScrollView:(UIScrollView*)scrollView; | 44 - (void)setScrollView:(UIScrollView*)scrollView; |
| 49 | 45 |
| 50 // Adds |observer| to subscribe to change notifications. | 46 // Adds |observer| to subscribe to change notifications. |
| 51 - (void)addObserver:(id<CRWWebViewScrollViewProxyObserver>)observer; | 47 - (void)addObserver:(id<CRWWebViewScrollViewProxyObserver>)observer; |
| 52 | 48 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // It inherit from CRWWebViewScrollViewScrollViewObserver which only implements | 85 // It inherit from CRWWebViewScrollViewScrollViewObserver which only implements |
| 90 // methods for listening to scrollview changes. | 86 // methods for listening to scrollview changes. |
| 91 @protocol CRWWebViewScrollViewProxyObserver<CRWWebViewScrollViewObserver> | 87 @protocol CRWWebViewScrollViewProxyObserver<CRWWebViewScrollViewObserver> |
| 92 @optional | 88 @optional |
| 93 // Called when the underlying scrollview of the proxy is set. | 89 // Called when the underlying scrollview of the proxy is set. |
| 94 - (void)webViewScrollViewProxyDidSetScrollView: | 90 - (void)webViewScrollViewProxyDidSetScrollView: |
| 95 (CRWWebViewScrollViewProxy*)webViewScrollViewProxy; | 91 (CRWWebViewScrollViewProxy*)webViewScrollViewProxy; |
| 96 @end | 92 @end |
| 97 | 93 |
| 98 #endif // IOS_WEB_PUBLIC_WEB_STATE_CRW_WEB_VIEW_SCROLL_VIEW_PROXY_H_ | 94 #endif // IOS_WEB_PUBLIC_WEB_STATE_CRW_WEB_VIEW_SCROLL_VIEW_PROXY_H_ |
| OLD | NEW |