| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/chrome/browser/ui/overscroll_actions/overscroll_actions_controller.
h" | 5 #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller.
h" |
| 6 | 6 |
| 7 #import <QuartzCore/QuartzCore.h> | 7 #import <QuartzCore/QuartzCore.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 } else { | 580 } else { |
| 581 return static_cast<id<OverscrollActionsScrollView>>( | 581 return static_cast<id<OverscrollActionsScrollView>>( |
| 582 _webViewScrollViewProxy.get()); | 582 _webViewScrollViewProxy.get()); |
| 583 } | 583 } |
| 584 } | 584 } |
| 585 | 585 |
| 586 - (void)setScrollViewContentInset:(UIEdgeInsets)contentInset { | 586 - (void)setScrollViewContentInset:(UIEdgeInsets)contentInset { |
| 587 if (_scrollview) | 587 if (_scrollview) |
| 588 [_scrollview setContentInset:contentInset]; | 588 [_scrollview setContentInset:contentInset]; |
| 589 else | 589 else |
| 590 [_webViewScrollViewProxy setContentInsetFast:contentInset]; | 590 [_webViewScrollViewProxy setContentInset:contentInset]; |
| 591 } | 591 } |
| 592 | 592 |
| 593 - (UIView<RelaxedBoundsConstraintsHitTestSupport>*)headerView { | 593 - (UIView<RelaxedBoundsConstraintsHitTestSupport>*)headerView { |
| 594 return [self.delegate headerView]; | 594 return [self.delegate headerView]; |
| 595 } | 595 } |
| 596 | 596 |
| 597 - (void)incrementOverscrollActionLockForNotification:(NSNotification*)notif { | 597 - (void)incrementOverscrollActionLockForNotification:(NSNotification*)notif { |
| 598 if (![_lockIncrementNotifications containsObject:notif.name]) { | 598 if (![_lockIncrementNotifications containsObject:notif.name]) { |
| 599 [_lockIncrementNotifications addObject:notif.name]; | 599 [_lockIncrementNotifications addObject:notif.name]; |
| 600 ++_overscrollActionLock; | 600 ++_overscrollActionLock; |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 _panGestureRecognizer.enabled = YES; | 872 _panGestureRecognizer.enabled = YES; |
| 873 [self scrollView].panGestureRecognizer.enabled = NO; | 873 [self scrollView].panGestureRecognizer.enabled = NO; |
| 874 [self scrollView].panGestureRecognizer.enabled = YES; | 874 [self scrollView].panGestureRecognizer.enabled = YES; |
| 875 [self startBounceWithInitialVelocity:CGPointZero]; | 875 [self startBounceWithInitialVelocity:CGPointZero]; |
| 876 [self.delegate | 876 [self.delegate |
| 877 overscrollActionsController:self | 877 overscrollActionsController:self |
| 878 didTriggerAction:self.overscrollActionView.selectedAction]; | 878 didTriggerAction:self.overscrollActionView.selectedAction]; |
| 879 } | 879 } |
| 880 | 880 |
| 881 @end | 881 @end |
| OLD | NEW |