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

Side by Side Diff: chrome/browser/ui/cocoa/task_manager_mac.mm

Issue 10826027: mac: -[NSTableColumn initWithIdentifier:] takes NSString instead of id with the 10.7 sdk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « no previous file | chrome/browser/ui/cocoa/task_manager_mac_unittest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/cocoa/task_manager_mac.h" 5 #include "chrome/browser/ui/cocoa/task_manager_mac.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/mac/bundle_locations.h" 10 #include "base/mac/bundle_locations.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 - (void)dealloc { 216 - (void)dealloc {
217 [tableView_ setDelegate:nil]; 217 [tableView_ setDelegate:nil];
218 [tableView_ setDataSource:nil]; 218 [tableView_ setDataSource:nil];
219 [super dealloc]; 219 [super dealloc];
220 } 220 }
221 221
222 // Adds a column which has the given string id as title. |isVisible| specifies 222 // Adds a column which has the given string id as title. |isVisible| specifies
223 // if the column is initially visible. 223 // if the column is initially visible.
224 - (NSTableColumn*)addColumnWithId:(int)columnId visible:(BOOL)isVisible { 224 - (NSTableColumn*)addColumnWithId:(int)columnId visible:(BOOL)isVisible {
225 scoped_nsobject<NSTableColumn> column([[NSTableColumn alloc] 225 scoped_nsobject<NSTableColumn> column([[NSTableColumn alloc]
226 initWithIdentifier:[NSNumber numberWithInt:columnId]]); 226 initWithIdentifier:[NSString stringWithFormat:@"%d", columnId]]);
227 227
228 NSTextAlignment textAlignment = 228 NSTextAlignment textAlignment =
229 (columnId == IDS_TASK_MANAGER_TASK_COLUMN || 229 (columnId == IDS_TASK_MANAGER_TASK_COLUMN ||
230 columnId == IDS_TASK_MANAGER_PROFILE_NAME_COLUMN) ? 230 columnId == IDS_TASK_MANAGER_PROFILE_NAME_COLUMN) ?
231 NSLeftTextAlignment : NSRightTextAlignment; 231 NSLeftTextAlignment : NSRightTextAlignment;
232 232
233 [[column.get() headerCell] 233 [[column.get() headerCell]
234 setStringValue:l10n_util::GetNSStringWithFixup(columnId)]; 234 setStringValue:l10n_util::GetNSStringWithFixup(columnId)];
235 [[column.get() headerCell] setAlignment:textAlignment]; 235 [[column.get() headerCell] setAlignment:textAlignment];
236 [[column.get() dataCell] setAlignment:textAlignment]; 236 [[column.get() dataCell] setAlignment:textAlignment];
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 // "Task Manager" so close the existing window and fall through to 647 // "Task Manager" so close the existing window and fall through to
648 // open a new one. 648 // open a new one.
649 [[instance_->window_controller_ window] close]; 649 [[instance_->window_controller_ window] close];
650 } 650 }
651 } 651 }
652 // Create a new instance. 652 // Create a new instance.
653 instance_ = new TaskManagerMac(TaskManager::GetInstance(), 653 instance_ = new TaskManagerMac(TaskManager::GetInstance(),
654 highlight_background_resources); 654 highlight_background_resources);
655 instance_->model_->StartUpdating(); 655 instance_->model_->StartUpdating();
656 } 656 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/task_manager_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698