| 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 26 matching lines...) Expand all Loading... |
| 37 // bypasses a very slow update path in UIWebView. | 37 // bypasses a very slow update path in UIWebView. |
| 38 - (void)setContentInsetFast:(UIEdgeInsets)contentInset; | 38 - (void)setContentInsetFast:(UIEdgeInsets)contentInset; |
| 39 | 39 |
| 40 - (void)addGestureRecognizer:(UIGestureRecognizer*)gestureRecognizer; | 40 - (void)addGestureRecognizer:(UIGestureRecognizer*)gestureRecognizer; |
| 41 - (void)removeGestureRecognizer:(UIGestureRecognizer*)gestureRecognizer; | 41 - (void)removeGestureRecognizer:(UIGestureRecognizer*)gestureRecognizer; |
| 42 - (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated; | 42 - (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated; |
| 43 | 43 |
| 44 // Used by the CRWWebViewProxy to set the UIScrollView to be managed. | 44 // Used by the CRWWebViewProxy to set the UIScrollView to be managed. |
| 45 - (void)setScrollView:(UIScrollView*)scrollView; | 45 - (void)setScrollView:(UIScrollView*)scrollView; |
| 46 | 46 |
| 47 // Copies all display properties that can be set on a CRWWebViewScrollViewProxy | |
| 48 // from the underlying UIScrollView into |scrollView|. | |
| 49 - (void)copyPropertiesToScrollView:(UIScrollView*)scrollView; | |
| 50 | |
| 51 // Adds |observer| to subscribe to change notifications. | 47 // Adds |observer| to subscribe to change notifications. |
| 52 - (void)addObserver:(id<CRWWebViewScrollViewProxyObserver>)observer; | 48 - (void)addObserver:(id<CRWWebViewScrollViewProxyObserver>)observer; |
| 53 | 49 |
| 54 // Removes |observer| as a subscriber for change notifications. | 50 // Removes |observer| as a subscriber for change notifications. |
| 55 - (void)removeObserver:(id<CRWWebViewScrollViewProxyObserver>)observer; | 51 - (void)removeObserver:(id<CRWWebViewScrollViewProxyObserver>)observer; |
| 56 | 52 |
| 57 @end | 53 @end |
| 58 | 54 |
| 59 // A protocol to be implemented by objects to listen for changes to the | 55 // A protocol to be implemented by objects to listen for changes to the |
| 60 // UIScrollView. | 56 // UIScrollView. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 86 // It inherit from CRWWebViewScrollViewScrollViewObserver which only implements | 82 // It inherit from CRWWebViewScrollViewScrollViewObserver which only implements |
| 87 // methods for listening to scrollview changes. | 83 // methods for listening to scrollview changes. |
| 88 @protocol CRWWebViewScrollViewProxyObserver<CRWWebViewScrollViewObserver> | 84 @protocol CRWWebViewScrollViewProxyObserver<CRWWebViewScrollViewObserver> |
| 89 @optional | 85 @optional |
| 90 // Called when the underlying scrollview of the proxy is set. | 86 // Called when the underlying scrollview of the proxy is set. |
| 91 - (void)webViewScrollViewProxyDidSetScrollView: | 87 - (void)webViewScrollViewProxyDidSetScrollView: |
| 92 (CRWWebViewScrollViewProxy*)webViewScrollViewProxy; | 88 (CRWWebViewScrollViewProxy*)webViewScrollViewProxy; |
| 93 @end | 89 @end |
| 94 | 90 |
| 95 #endif // IOS_WEB_PUBLIC_WEB_STATE_CRW_WEB_VIEW_SCROLL_VIEW_PROXY_H_ | 91 #endif // IOS_WEB_PUBLIC_WEB_STATE_CRW_WEB_VIEW_SCROLL_VIEW_PROXY_H_ |
| OLD | NEW |