| 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 | 10 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // UI is displayed. | 68 // UI is displayed. |
| 69 BOOL overscrollActionsInProgress_; | 69 BOOL overscrollActionsInProgress_; |
| 70 // Counter used to keep track of the number of actions currently disabling | 70 // Counter used to keep track of the number of actions currently disabling |
| 71 // full screen. | 71 // full screen. |
| 72 uint fullScreenLock_; | 72 uint fullScreenLock_; |
| 73 // CRWWebViewProxy object allows web view manipulations. | 73 // CRWWebViewProxy object allows web view manipulations. |
| 74 id<CRWWebViewProxy> webViewProxy_; | 74 id<CRWWebViewProxy> webViewProxy_; |
| 75 } | 75 } |
| 76 | 76 |
| 77 // Access to the UIWebView's UIScrollView. | 77 // Access to the UIWebView's UIScrollView. |
| 78 @property(unsafe_unretained, nonatomic, readonly) | 78 @property(weak, nonatomic, readonly) CRWWebViewScrollViewProxy* scrollViewProxy; |
| 79 CRWWebViewScrollViewProxy* scrollViewProxy; | |
| 80 // The navigation controller of the page. | 79 // The navigation controller of the page. |
| 81 @property(nonatomic, readonly, assign) NavigationManager* navigationManager; | 80 @property(nonatomic, readonly, assign) NavigationManager* navigationManager; |
| 82 // The gesture recognizer set on the scrollview to detect tap. Must be readwrite | 81 // The gesture recognizer set on the scrollview to detect tap. Must be readwrite |
| 83 // for property releaser to work. | 82 // for property releaser to work. |
| 84 @property(nonatomic, readwrite, strong) | 83 @property(nonatomic, readwrite, strong) |
| 85 UITapGestureRecognizer* userInteractionGestureRecognizer; | 84 UITapGestureRecognizer* userInteractionGestureRecognizer; |
| 86 // The delegate responsible for providing the header height and moving the | 85 // The delegate responsible for providing the header height and moving the |
| 87 // header. | 86 // header. |
| 88 @property(unsafe_unretained, nonatomic, readonly) | 87 @property(weak, nonatomic, readonly) id<FullScreenControllerDelegate> delegate; |
| 89 id<FullScreenControllerDelegate> | |
| 90 delegate; | |
| 91 // Current height of the header, in points. This is a pass-through method that | 88 // Current height of the header, in points. This is a pass-through method that |
| 92 // fetches the header height from the FullScreenControllerDelegate. | 89 // fetches the header height from the FullScreenControllerDelegate. |
| 93 @property(nonatomic, readonly) CGFloat headerHeight; | 90 @property(nonatomic, readonly) CGFloat headerHeight; |
| 94 // |top| field of UIScrollView.contentInset value caused by header. | 91 // |top| field of UIScrollView.contentInset value caused by header. |
| 95 // Always 0 for WKWebView, as it does not support contentInset. | 92 // Always 0 for WKWebView, as it does not support contentInset. |
| 96 @property(nonatomic, readonly) CGFloat topContentInsetCausedByHeader; | 93 @property(nonatomic, readonly) CGFloat topContentInsetCausedByHeader; |
| 97 // Last known y offset of the content in the scroll view during a scroll. Used | 94 // Last known y offset of the content in the scroll view during a scroll. Used |
| 98 // to infer the direction of the current scroll. | 95 // to infer the direction of the current scroll. |
| 99 @property(nonatomic, assign) CGFloat previousContentOffset; | 96 @property(nonatomic, assign) CGFloat previousContentOffset; |
| 100 // Last known y offset requested on the scroll view. In general the same value | 97 // Last known y offset requested on the scroll view. In general the same value |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 overscrollActionsInProgress_ = NO; | 810 overscrollActionsInProgress_ = NO; |
| 814 } | 811 } |
| 815 | 812 |
| 816 #pragma mark - Used for testing | 813 #pragma mark - Used for testing |
| 817 | 814 |
| 818 + (void)setEnabledForTests:(BOOL)enabled { | 815 + (void)setEnabledForTests:(BOOL)enabled { |
| 819 gEnabledForTests = enabled; | 816 gEnabledForTests = enabled; |
| 820 } | 817 } |
| 821 | 818 |
| 822 @end | 819 @end |
| OLD | NEW |