| 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_view.h" | 5 #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_view.h" |
| 6 | 6 |
| 7 #import <QuartzCore/QuartzCore.h> | 7 #import <QuartzCore/QuartzCore.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/mac/objc_property_releaser.h" | 10 #include "base/mac/objc_property_releaser.h" |
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 self.selectionCircleMaskLayer.transform = | 683 self.selectionCircleMaskLayer.transform = |
| 684 self.selectionCircleLayer.transform; | 684 self.selectionCircleLayer.transform; |
| 685 } | 685 } |
| 686 } else { | 686 } else { |
| 687 // Scale selection up. | 687 // Scale selection up. |
| 688 self.selectionCircleLayer.transform = CATransform3DMakeScale(1, 1, 1); | 688 self.selectionCircleLayer.transform = CATransform3DMakeScale(1, 1, 1); |
| 689 self.selectionCircleMaskLayer.transform = | 689 self.selectionCircleMaskLayer.transform = |
| 690 self.selectionCircleLayer.transform; | 690 self.selectionCircleLayer.transform; |
| 691 } | 691 } |
| 692 [UIView commitAnimations]; | 692 [UIView commitAnimations]; |
| 693 |
| 694 [self.delegate overscrollActionsView:self |
| 695 selectedActionDidChange:self.selectedAction]; |
| 693 } | 696 } |
| 694 | 697 |
| 695 - (base::scoped_nsobject<NSArray>&)layersToCenterVertically { | 698 - (base::scoped_nsobject<NSArray>&)layersToCenterVertically { |
| 696 if (!_layersToCenterVertically) { | 699 if (!_layersToCenterVertically) { |
| 697 NSArray* layersToCenterVertically = @[ | 700 NSArray* layersToCenterVertically = @[ |
| 698 _selectionCircleLayer, _selectionCircleMaskLayer, | 701 _selectionCircleLayer, _selectionCircleMaskLayer, |
| 699 _addTabActionImageView.layer, _refreshActionImageView.layer, | 702 _addTabActionImageView.layer, _refreshActionImageView.layer, |
| 700 _closeTabActionImageView.layer, _addTabActionImageViewHighlighted.layer, | 703 _closeTabActionImageView.layer, _addTabActionImageViewHighlighted.layer, |
| 701 _refreshActionImageViewHighlighted.layer, | 704 _refreshActionImageViewHighlighted.layer, |
| 702 _closeTabActionImageViewHighlighted.layer, _backgroundView.layer | 705 _closeTabActionImageViewHighlighted.layer, _backgroundView.layer |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 CGPoint tapLocation = [tapRecognizer locationInView:self]; | 991 CGPoint tapLocation = [tapRecognizer locationInView:self]; |
| 989 OverscrollAction action = [self actionAtLocation:tapLocation]; | 992 OverscrollAction action = [self actionAtLocation:tapLocation]; |
| 990 if (action != OverscrollAction::NONE) { | 993 if (action != OverscrollAction::NONE) { |
| 991 [self updateSelectionForTouchedAction:action]; | 994 [self updateSelectionForTouchedAction:action]; |
| 992 [self setSelectedAction:action]; | 995 [self setSelectedAction:action]; |
| 993 [self.delegate overscrollActionsViewDidTapTriggerAction:self]; | 996 [self.delegate overscrollActionsViewDidTapTriggerAction:self]; |
| 994 } | 997 } |
| 995 } | 998 } |
| 996 | 999 |
| 997 @end | 1000 @end |
| OLD | NEW |