| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/browser_view_controller.h" | 5 #import "ios/chrome/browser/ui/browser_view_controller.h" |
| 6 | 6 |
| 7 #import <AssetsLibrary/AssetsLibrary.h> | 7 #import <AssetsLibrary/AssetsLibrary.h> |
| 8 #import <MobileCoreServices/MobileCoreServices.h> | 8 #import <MobileCoreServices/MobileCoreServices.h> |
| 9 #import <PassKit/PassKit.h> | 9 #import <PassKit/PassKit.h> |
| 10 #import <Photos/Photos.h> | 10 #import <Photos/Photos.h> |
| (...skipping 2624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2635 | 2635 |
| 2636 CGFloat footerHeight = CGRectGetHeight(footer.frame); | 2636 CGFloat footerHeight = CGRectGetHeight(footer.frame); |
| 2637 CGFloat offset = headerOffset * footerHeight / headerHeight; | 2637 CGFloat offset = headerOffset * footerHeight / headerHeight; |
| 2638 return std::ceil(CGRectGetHeight(self.view.bounds) - footerHeight + offset); | 2638 return std::ceil(CGRectGetHeight(self.view.bounds) - footerHeight + offset); |
| 2639 } | 2639 } |
| 2640 | 2640 |
| 2641 - (void)fullScreenController:(FullScreenController*)controller | 2641 - (void)fullScreenController:(FullScreenController*)controller |
| 2642 headerAnimationCompleted:(BOOL)completed | 2642 headerAnimationCompleted:(BOOL)completed |
| 2643 offset:(CGFloat)offset { | 2643 offset:(CGFloat)offset { |
| 2644 if (completed) | 2644 if (completed) |
| 2645 [controller setToolbarInsetsForHeaderOffset:offset forceUpdate:YES]; | 2645 [controller setToolbarInsetsForHeaderOffset:offset]; |
| 2646 } | 2646 } |
| 2647 | 2647 |
| 2648 - (void)setFramesForHeaders:(const std::vector<HeaderDefinition>)headers | 2648 - (void)setFramesForHeaders:(const std::vector<HeaderDefinition>)headers |
| 2649 atOffset:(CGFloat)headerOffset { | 2649 atOffset:(CGFloat)headerOffset { |
| 2650 CGFloat height = [self headerOffset]; | 2650 CGFloat height = [self headerOffset]; |
| 2651 for (const auto& header : headers) { | 2651 for (const auto& header : headers) { |
| 2652 CGRect frame = [header.view frame]; | 2652 CGRect frame = [header.view frame]; |
| 2653 frame.origin.y = height - headerOffset - header.inset; | 2653 frame.origin.y = height - headerOffset - header.inset; |
| 2654 [header.view setFrame:frame]; | 2654 [header.view setFrame:frame]; |
| 2655 if (header.behaviour != Overlap) | 2655 if (header.behaviour != Overlap) |
| (...skipping 2433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5089 | 5089 |
| 5090 - (UIView*)voiceSearchButton { | 5090 - (UIView*)voiceSearchButton { |
| 5091 return _voiceSearchButton; | 5091 return _voiceSearchButton; |
| 5092 } | 5092 } |
| 5093 | 5093 |
| 5094 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { | 5094 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { |
| 5095 return [self currentLogoAnimationControllerOwner]; | 5095 return [self currentLogoAnimationControllerOwner]; |
| 5096 } | 5096 } |
| 5097 | 5097 |
| 5098 @end | 5098 @end |
| OLD | NEW |