| 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/tab_switcher/tab_switcher_controller.h" | 5 #import "ios/chrome/browser/ui/tab_switcher/tab_switcher_controller.h" |
| 6 | 6 |
| 7 #include "base/ios/block_types.h" | 7 #include "base/ios/block_types.h" |
| 8 #include "base/ios/weak_nsobject.h" | 8 #include "base/ios/weak_nsobject.h" |
| 9 #include "base/mac/scoped_nsobject.h" | 9 #include "base/mac/scoped_nsobject.h" |
| 10 #include "base/metrics/user_metrics.h" | 10 #include "base/metrics/user_metrics.h" |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 [self selectPanelForTabModel:activeModel]; | 333 [self selectPanelForTabModel:activeModel]; |
| 334 } | 334 } |
| 335 | 335 |
| 336 - (void)setOtrTabModel:(TabModel*)otrModel { | 336 - (void)setOtrTabModel:(TabModel*)otrModel { |
| 337 [_cache setMainTabModel:[_cache mainTabModel] otrTabModel:otrModel]; | 337 [_cache setMainTabModel:[_cache mainTabModel] otrTabModel:otrModel]; |
| 338 [_tabSwitcherModel setMainTabModel:[_tabSwitcherModel mainTabModel] | 338 [_tabSwitcherModel setMainTabModel:[_tabSwitcherModel mainTabModel] |
| 339 otrTabModel:otrModel]; | 339 otrTabModel:otrModel]; |
| 340 } | 340 } |
| 341 | 341 |
| 342 - (void)showWithSelectedTabAnimation { | 342 - (void)showWithSelectedTabAnimation { |
| 343 // Stores the current tab's scroll position. Helps determine whether the | |
| 344 // current tab snapshot should be updated or not. | |
| 345 [_onLoadActiveModel.currentTab recordStateInHistory]; | |
| 346 | |
| 347 [self updateWindowBackgroundColor]; | 343 [self updateWindowBackgroundColor]; |
| 348 [self performTabSwitcherTransition:TransitionType::TRANSITION_PRESENT | 344 [self performTabSwitcherTransition:TransitionType::TRANSITION_PRESENT |
| 349 withModel:_onLoadActiveModel | 345 withModel:_onLoadActiveModel |
| 350 animated:YES | 346 animated:YES |
| 351 withCompletion:^{ | 347 withCompletion:^{ |
| 352 [self.delegate | 348 [self.delegate |
| 353 tabSwitcherPresentationTransitionDidEnd:self]; | 349 tabSwitcherPresentationTransitionDidEnd:self]; |
| 354 }]; | 350 }]; |
| 355 } | 351 } |
| 356 | 352 |
| (...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1225 base::UserMetricsAction("MobileTabSwitcherCloseNonIncognitoTab")); | 1221 base::UserMetricsAction("MobileTabSwitcherCloseNonIncognitoTab")); |
| 1226 } | 1222 } |
| 1227 } | 1223 } |
| 1228 | 1224 |
| 1229 - (void)tabSwitcherPanelControllerDidUpdateOverlayViewVisibility: | 1225 - (void)tabSwitcherPanelControllerDidUpdateOverlayViewVisibility: |
| 1230 (TabSwitcherPanelController*)tabSwitcherPanelController { | 1226 (TabSwitcherPanelController*)tabSwitcherPanelController { |
| 1231 [_tabSwitcherView updateOverlayButtonState]; | 1227 [_tabSwitcherView updateOverlayButtonState]; |
| 1232 } | 1228 } |
| 1233 | 1229 |
| 1234 @end | 1230 @end |
| OLD | NEW |