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)isDecelerating { |
| 97 return [_scrollView isDecelerating]; |
| 98 } |
| 99 |
96 - (BOOL)isDragging { | 100 - (BOOL)isDragging { |
97 return [_scrollView isDragging]; | 101 return [_scrollView isDragging]; |
98 } | 102 } |
99 | 103 |
100 - (BOOL)isZooming { | 104 - (BOOL)isZooming { |
101 return [_scrollView isZooming]; | 105 return [_scrollView isZooming]; |
102 } | 106 } |
103 | 107 |
104 - (CGFloat)zoomScale { | 108 - (CGFloat)zoomScale { |
105 return [_scrollView zoomScale]; | 109 return [_scrollView zoomScale]; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 - (void)observeValueForKeyPath:(NSString*)keyPath | 232 - (void)observeValueForKeyPath:(NSString*)keyPath |
229 ofObject:(id)object | 233 ofObject:(id)object |
230 change:(NSDictionary*)change | 234 change:(NSDictionary*)change |
231 context:(void*)context { | 235 context:(void*)context { |
232 DCHECK_EQ(object, _scrollView); | 236 DCHECK_EQ(object, _scrollView); |
233 if ([keyPath isEqualToString:@"contentSize"]) | 237 if ([keyPath isEqualToString:@"contentSize"]) |
234 [_observers webViewScrollViewDidResetContentSize:self]; | 238 [_observers webViewScrollViewDidResetContentSize:self]; |
235 } | 239 } |
236 | 240 |
237 @end | 241 @end |
OLD | NEW |