Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Side by Side Diff: ios/chrome/browser/ui/tab_switcher/tab_switcher_controller.mm

Issue 2612773002: [ios] Style cleanups in tab switcher code.
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ios/chrome/browser/ui/tab_switcher/tab_switcher_model.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 .get()) { 996 .get()) {
997 DCHECK([panel isKindOfClass:[TabSwitcherPanelController class]]); 997 DCHECK([panel isKindOfClass:[TabSwitcherPanelController class]]);
998 if ([panel sessionTag] == tag) { 998 if ([panel sessionTag] == tag) {
999 [panel updateCollectionViewIfNeeded]; 999 [panel updateCollectionViewIfNeeded];
1000 return; 1000 return;
1001 } 1001 }
1002 } 1002 }
1003 } 1003 }
1004 1004
1005 - (void)localSessionMayNeedUpdate:(TabSwitcherSessionType)type { 1005 - (void)localSessionMayNeedUpdate:(TabSwitcherSessionType)type {
1006 if (type == TabSwitcherSessionType::REGULAR_SESSION) { 1006 switch (type) {
1007 [_onTheRecordSession updateCollectionViewIfNeeded]; 1007 case TabSwitcherSessionType::REGULAR_SESSION:
1008 } else { 1008 [_onTheRecordSession updateCollectionViewIfNeeded];
1009 DCHECK(type == TabSwitcherSessionType::OFF_THE_RECORD_SESSION); 1009 break;
1010 [_offTheRecordSession updateCollectionViewIfNeeded]; 1010 case TabSwitcherSessionType::OFF_THE_RECORD_SESSION:
1011 [_offTheRecordSession updateCollectionViewIfNeeded];
1012 break;
1013 case TabSwitcherSessionType::DISTANT_SESSION:
1014 NOTREACHED();
1015 break;
1011 } 1016 }
1012 } 1017 }
1013 1018
1014 - (void)signInPanelChangedTo:(TabSwitcherSignInPanelsType)newPanelType { 1019 - (void)signInPanelChangedTo:(TabSwitcherSignInPanelsType)newPanelType {
1015 if (_signInPanelType == newPanelType) 1020 if (_signInPanelType == newPanelType)
1016 return; 1021 return;
1017 1022
1018 // Remove promo panel that is no longer relevant, if any. 1023 // Remove promo panel that is no longer relevant, if any.
1019 if (_signInPanelType != TabSwitcherSignInPanelsType::NO_PANEL) { 1024 if (_signInPanelType != TabSwitcherSignInPanelsType::NO_PANEL) {
1020 _shouldRemovePromoPanelHeaderCell = YES; 1025 _shouldRemovePromoPanelHeaderCell = YES;
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 base::UserMetricsAction("MobileTabSwitcherCloseNonIncognitoTab")); 1243 base::UserMetricsAction("MobileTabSwitcherCloseNonIncognitoTab"));
1239 } 1244 }
1240 } 1245 }
1241 1246
1242 - (void)tabSwitcherPanelControllerDidUpdateOverlayViewVisibility: 1247 - (void)tabSwitcherPanelControllerDidUpdateOverlayViewVisibility:
1243 (TabSwitcherPanelController*)tabSwitcherPanelController { 1248 (TabSwitcherPanelController*)tabSwitcherPanelController {
1244 [_tabSwitcherView updateOverlayButtonState]; 1249 [_tabSwitcherView updateOverlayButtonState];
1245 } 1250 }
1246 1251
1247 @end 1252 @end
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/ui/tab_switcher/tab_switcher_model.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698