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 #import "ios/web/public/web_state/ui/crw_web_view_scroll_view_proxy.h" | 5 #import "ios/web/public/web_state/ui/crw_web_view_scroll_view_proxy.h" |
6 | 6 |
7 #import <objc/runtime.h> | 7 #import <objc/runtime.h> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #import "base/ios/crb_protocol_observers.h" | 10 #import "base/ios/crb_protocol_observers.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 } | 86 } |
87 | 87 |
88 - (BOOL)bounces { | 88 - (BOOL)bounces { |
89 return [_scrollView bounces]; | 89 return [_scrollView bounces]; |
90 } | 90 } |
91 | 91 |
92 - (void)setBounces:(BOOL)bounces { | 92 - (void)setBounces:(BOOL)bounces { |
93 [_scrollView setBounces:bounces]; | 93 [_scrollView setBounces:bounces]; |
94 } | 94 } |
95 | 95 |
| 96 - (BOOL)isDragging { |
| 97 return [_scrollView isDragging]; |
| 98 } |
| 99 |
96 - (BOOL)isZooming { | 100 - (BOOL)isZooming { |
97 return [_scrollView isZooming]; | 101 return [_scrollView isZooming]; |
98 } | 102 } |
99 | 103 |
100 - (CGFloat)zoomScale { | 104 - (CGFloat)zoomScale { |
101 return [_scrollView zoomScale]; | 105 return [_scrollView zoomScale]; |
102 } | 106 } |
103 | 107 |
104 - (void)setContentOffset:(CGPoint)contentOffset { | 108 - (void)setContentOffset:(CGPoint)contentOffset { |
105 [_scrollView setContentOffset:contentOffset]; | 109 [_scrollView setContentOffset:contentOffset]; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 - (void)observeValueForKeyPath:(NSString*)keyPath | 228 - (void)observeValueForKeyPath:(NSString*)keyPath |
225 ofObject:(id)object | 229 ofObject:(id)object |
226 change:(NSDictionary*)change | 230 change:(NSDictionary*)change |
227 context:(void*)context { | 231 context:(void*)context { |
228 DCHECK_EQ(object, _scrollView); | 232 DCHECK_EQ(object, _scrollView); |
229 if ([keyPath isEqualToString:@"contentSize"]) | 233 if ([keyPath isEqualToString:@"contentSize"]) |
230 [_observers webViewScrollViewDidResetContentSize:self]; | 234 [_observers webViewScrollViewDidResetContentSize:self]; |
231 } | 235 } |
232 | 236 |
233 @end | 237 @end |
OLD | NEW |