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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm

Issue 7134026: Multi-tab: Renaming TabStripModel::GetSelectedTabContents to GetActiveTabContents (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renaming in tab_strip_controller.mm too. Created 9 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" 5 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
6 6
7 #import <QuartzCore/QuartzCore.h> 7 #import <QuartzCore/QuartzCore.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 NSString* description = l10n_util::GetNSStringWithFixup(IDS_ACCNAME_NEWTAB); 459 NSString* description = l10n_util::GetNSStringWithFixup(IDS_ACCNAME_NEWTAB);
460 [[newTabButton_ cell] 460 [[newTabButton_ cell]
461 accessibilitySetOverrideValue:description 461 accessibilitySetOverrideValue:description
462 forAttribute:NSAccessibilityDescriptionAttribute]; 462 forAttribute:NSAccessibilityDescriptionAttribute];
463 463
464 // Controller may have been (re-)created by switching layout modes, which 464 // Controller may have been (re-)created by switching layout modes, which
465 // means the tab model is already fully formed with tabs. Need to walk the 465 // means the tab model is already fully formed with tabs. Need to walk the
466 // list and create the UI for each. 466 // list and create the UI for each.
467 const int existingTabCount = tabStripModel_->count(); 467 const int existingTabCount = tabStripModel_->count();
468 const TabContentsWrapper* selection = 468 const TabContentsWrapper* selection =
469 tabStripModel_->GetSelectedTabContents(); 469 tabStripModel_->GetActiveTabContents();
470 for (int i = 0; i < existingTabCount; ++i) { 470 for (int i = 0; i < existingTabCount; ++i) {
471 TabContentsWrapper* currentContents = tabStripModel_->GetTabContentsAt(i); 471 TabContentsWrapper* currentContents = tabStripModel_->GetTabContentsAt(i);
472 [self insertTabWithContents:currentContents 472 [self insertTabWithContents:currentContents
473 atIndex:i 473 atIndex:i
474 inForeground:NO]; 474 inForeground:NO];
475 if (selection == currentContents) { 475 if (selection == currentContents) {
476 // Must manually force a selection since the model won't send 476 // Must manually force a selection since the model won't send
477 // selection messages in this scenario. 477 // selection messages in this scenario.
478 [self activateTabWithContents:currentContents 478 [self activateTabWithContents:currentContents
479 previousContents:NULL 479 previousContents:NULL
(...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after
2136 } 2136 }
2137 2137
2138 std::string profileName = browser_->profile()->GetPrefs()->GetString( 2138 std::string profileName = browser_->profile()->GetPrefs()->GetString(
2139 prefs::kGoogleServicesUsername); 2139 prefs::kGoogleServicesUsername);
2140 [profileMenuButton_ setProfileDisplayName: 2140 [profileMenuButton_ setProfileDisplayName:
2141 [NSString stringWithUTF8String:profileName.c_str()]]; 2141 [NSString stringWithUTF8String:profileName.c_str()]];
2142 [profileMenuButton_ setHidden:NO]; 2142 [profileMenuButton_ setHidden:NO];
2143 } 2143 }
2144 2144
2145 @end 2145 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698