| 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 name:ios_internal::kSideSwipeWillStartNotification | 291 name:ios_internal::kSideSwipeWillStartNotification |
| 292 object:nil]; | 292 object:nil]; |
| 293 [center addObserver:self | 293 [center addObserver:self |
| 294 selector:@selector(decrementFullScreenLock) | 294 selector:@selector(decrementFullScreenLock) |
| 295 name:ios_internal::kSideSwipeDidStopNotification | 295 name:ios_internal::kSideSwipeDidStopNotification |
| 296 object:nil]; | 296 object:nil]; |
| 297 // TODO(jbbegue): Evaluate using a listener instead of a notification | 297 // TODO(jbbegue): Evaluate using a listener instead of a notification |
| 298 // crbug/451373. | 298 // crbug/451373. |
| 299 [center addObserver:self | 299 [center addObserver:self |
| 300 selector:@selector(overscrollActionsWillStart) | 300 selector:@selector(overscrollActionsWillStart) |
| 301 name:ios_internal::kOverscollActionsWillStart | 301 name:kOverscrollActionsWillStart |
| 302 object:nil]; | 302 object:nil]; |
| 303 [center addObserver:self | 303 [center addObserver:self |
| 304 selector:@selector(overscrollActionsDidEnd) | 304 selector:@selector(overscrollActionsDidEnd) |
| 305 name:ios_internal::kOverscollActionsDidEnd | 305 name:kOverscrollActionsDidEnd |
| 306 object:nil]; | 306 object:nil]; |
| 307 [self moveHeaderToRestingPosition:YES]; | 307 [self moveHeaderToRestingPosition:YES]; |
| 308 } | 308 } |
| 309 return self; | 309 return self; |
| 310 } | 310 } |
| 311 | 311 |
| 312 - (void)invalidate { | 312 - (void)invalidate { |
| 313 delegate_ = nil; | 313 delegate_ = nil; |
| 314 navigationManager_ = NULL; | 314 navigationManager_ = NULL; |
| 315 [self.scrollViewProxy removeObserver:self]; | 315 [self.scrollViewProxy removeObserver:self]; |
| (...skipping 503 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 |