OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/fullscreen_controller.h" | 5 #import "ios/chrome/browser/ui/fullscreen_controller.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 - (void)dealloc { | 319 - (void)dealloc { |
320 [[NSNotificationCenter defaultCenter] removeObserver:self]; | 320 [[NSNotificationCenter defaultCenter] removeObserver:self]; |
321 [super dealloc]; | 321 [super dealloc]; |
322 } | 322 } |
323 | 323 |
324 - (CRWWebViewScrollViewProxy*)scrollViewProxy { | 324 - (CRWWebViewScrollViewProxy*)scrollViewProxy { |
325 return [webViewProxy_ scrollViewProxy]; | 325 return [webViewProxy_ scrollViewProxy]; |
326 } | 326 } |
327 | 327 |
328 - (CGFloat)headerHeight { | 328 - (CGFloat)headerHeight { |
329 return [self.delegate headerHeight]; | 329 return [self.delegate headerHeightForCurrentTab]; |
330 } | 330 } |
331 | 331 |
332 - (CGFloat)topContentInsetCausedByHeader { | 332 - (CGFloat)topContentInsetCausedByHeader { |
333 if ([webViewProxy_ shouldUseInsetForTopPadding]) { | 333 if ([webViewProxy_ shouldUseInsetForTopPadding]) { |
334 // If the web view's |shouldUseInsetForTopPadding| is YES, fullscreen | 334 // If the web view's |shouldUseInsetForTopPadding| is YES, fullscreen |
335 // header insets the content by modifying content inset. | 335 // header insets the content by modifying content inset. |
336 return self.headerHeight; | 336 return self.headerHeight; |
337 } | 337 } |
338 return 0.0f; | 338 return 0.0f; |
339 } | 339 } |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
819 overscrollActionsInProgress_ = NO; | 819 overscrollActionsInProgress_ = NO; |
820 } | 820 } |
821 | 821 |
822 #pragma mark - Used for testing | 822 #pragma mark - Used for testing |
823 | 823 |
824 + (void)setEnabledForTests:(BOOL)enabled { | 824 + (void)setEnabledForTests:(BOOL)enabled { |
825 gEnabledForTests = enabled; | 825 gEnabledForTests = enabled; |
826 } | 826 } |
827 | 827 |
828 @end | 828 @end |
OLD | NEW |