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

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

Issue 7043020: Multi-tab selection: Renaming TabStripModelObserver::TabSelectedAt to ActiveTabChanged (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing Created 9 years, 7 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
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 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 1266
1267 - (void)tabReplacedWithContents:(TabContentsWrapper*)newContents 1267 - (void)tabReplacedWithContents:(TabContentsWrapper*)newContents
1268 previousContents:(TabContentsWrapper*)oldContents 1268 previousContents:(TabContentsWrapper*)oldContents
1269 atIndex:(NSInteger)modelIndex { 1269 atIndex:(NSInteger)modelIndex {
1270 NSInteger index = [self indexFromModelIndex:modelIndex]; 1270 NSInteger index = [self indexFromModelIndex:modelIndex];
1271 TabContentsController* oldController = 1271 TabContentsController* oldController =
1272 [tabContentsArray_ objectAtIndex:index]; 1272 [tabContentsArray_ objectAtIndex:index];
1273 DCHECK_EQ(oldContents->tab_contents(), [oldController tabContents]); 1273 DCHECK_EQ(oldContents->tab_contents(), [oldController tabContents]);
1274 1274
1275 // Simply create a new TabContentsController for |newContents| and place it 1275 // Simply create a new TabContentsController for |newContents| and place it
1276 // into the array, replacing |oldContents|. A TabSelectedAt notification will 1276 // into the array, replacing |oldContents|. A TabActivatedAt notification
1277 // follow, at which point we will install the new view. 1277 // will follow, at which point we will install the new view.
1278 scoped_nsobject<TabContentsController> newController( 1278 scoped_nsobject<TabContentsController> newController(
1279 [[TabContentsController alloc] 1279 [[TabContentsController alloc]
1280 initWithContents:newContents->tab_contents() 1280 initWithContents:newContents->tab_contents()
1281 delegate:self]); 1281 delegate:self]);
1282 1282
1283 // Bye bye, |oldController|. 1283 // Bye bye, |oldController|.
1284 [tabContentsArray_ replaceObjectAtIndex:index withObject:newController]; 1284 [tabContentsArray_ replaceObjectAtIndex:index withObject:newController];
1285 1285
1286 [delegate_ onReplaceTabWithContents:newContents->tab_contents()]; 1286 [delegate_ onReplaceTabWithContents:newContents->tab_contents()];
1287 1287
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
2190 keyEquivalent:@""]; 2190 keyEquivalent:@""];
2191 [menuItem setState:NSOffState]; 2191 [menuItem setState:NSOffState];
2192 [menuItem setTarget:self]; 2192 [menuItem setTarget:self];
2193 } 2193 }
2194 2194
2195 - (void)createNewProfile:(id)sender { 2195 - (void)createNewProfile:(id)sender {
2196 ProfileManager::CreateMultiProfileAsync(); 2196 ProfileManager::CreateMultiProfileAsync();
2197 } 2197 }
2198 2198
2199 @end 2199 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698