Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Unified Diff: ios/web_view/internal/cwv_scroll_view.mm

Issue 2876753002: Add more methods to CWVScrollView and CWVScrollViewDelegate. (Closed)
Patch Set: Add more methods. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ios/web_view/public/cwv_scroll_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web_view/internal/cwv_scroll_view.mm
diff --git a/ios/web_view/internal/cwv_scroll_view.mm b/ios/web_view/internal/cwv_scroll_view.mm
index 53dc5d8cb22857e8edd9ced179bc94dcc5e9da57..4a4c2a54da834d9fcb7fbe7e31712eef03d027d8 100644
--- a/ios/web_view/internal/cwv_scroll_view.mm
+++ b/ios/web_view/internal/cwv_scroll_view.mm
@@ -42,14 +42,30 @@
_proxy.contentOffset = contentOffset;
}
+- (UIEdgeInsets)scrollIndicatorInsets {
+ return _proxy.scrollIndicatorInsets;
+}
+
+- (void)setScrollIndicatorInsets:(UIEdgeInsets)scrollIndicatorInsets {
+ _proxy.scrollIndicatorInsets = scrollIndicatorInsets;
+}
+
- (CGRect)bounds {
return {_proxy.contentOffset, _proxy.frame.size};
}
+- (BOOL)isDecelerating {
+ return _proxy.decelerating;
+}
+
- (BOOL)isDragging {
return _proxy.dragging;
}
+- (UIPanGestureRecognizer*)panGestureRecognizer {
+ return _proxy.panGestureRecognizer;
+}
+
- (UIEdgeInsets)contentInset {
return _proxy.contentInset;
}
@@ -58,10 +74,18 @@
_proxy.contentInset = contentInset;
}
+- (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated {
+ [_proxy setContentOffset:contentOffset animated:animated];
+}
+
- (void)addGestureRecognizer:(UIGestureRecognizer*)gestureRecognizer {
[_proxy addGestureRecognizer:gestureRecognizer];
}
+- (void)removeGestureRecognizer:(UIGestureRecognizer*)gestureRecognizer {
+ [_proxy removeGestureRecognizer:gestureRecognizer];
+}
+
#pragma mark - NSObject
- (void)dealloc {
@@ -108,6 +132,14 @@
}
}
+- (void)webViewScrollViewWillBeginZooming:
+ (CRWWebViewScrollViewProxy*)webViewScrollViewProxy {
+ SEL selector = @selector(scrollViewWillBeginZooming:);
+ if ([_delegate respondsToSelector:selector]) {
+ [_delegate scrollViewWillBeginZooming:self];
+ }
+}
+
- (void)webViewScrollViewDidResetContentSize:
(CRWWebViewScrollViewProxy*)webViewScrollViewProxy {
self.contentSize = _proxy.contentSize;
« no previous file with comments | « no previous file | ios/web_view/public/cwv_scroll_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698