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

Unified Diff: chrome/browser/ui/cocoa/task_manager_mac.mm

Issue 7828007: Add Profile data to the Task Manager on OS Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/task_manager_mac.mm
===================================================================
--- chrome/browser/ui/cocoa/task_manager_mac.mm (revision 99168)
+++ chrome/browser/ui/cocoa/task_manager_mac.mm (working copy)
@@ -31,6 +31,7 @@
} columnWidths[] = {
// Note that arraysize includes the trailing \0. That's intended.
{ IDS_TASK_MANAGER_PAGE_COLUMN, 120, 600 },
+ { IDS_TASK_MANAGER_PROFILE_NAME_COLUMN, 60, 200 },
{ IDS_TASK_MANAGER_PHYSICAL_MEM_COLUMN,
arraysize("800 MiB") * kCharWidth, -1 },
{ IDS_TASK_MANAGER_SHARED_MEM_COLUMN,
@@ -220,8 +221,10 @@
scoped_nsobject<NSTableColumn> column([[NSTableColumn alloc]
initWithIdentifier:[NSNumber numberWithInt:columnId]]);
- NSTextAlignment textAlignment = columnId == IDS_TASK_MANAGER_PAGE_COLUMN ?
- NSLeftTextAlignment : NSRightTextAlignment;
+ NSTextAlignment textAlignment =
+ (columnId == IDS_TASK_MANAGER_PAGE_COLUMN ||
+ columnId == IDS_TASK_MANAGER_PROFILE_NAME_COLUMN) ?
+ NSLeftTextAlignment : NSRightTextAlignment;
[[column.get() headerCell]
setStringValue:l10n_util::GetNSStringWithFixup(columnId)];
@@ -285,7 +288,7 @@
// Initially, sort on the tab name.
[tableView_ setSortDescriptors:
[NSArray arrayWithObject:[nameColumn sortDescriptorPrototype]]];
-
+ [self addColumnWithId:IDS_TASK_MANAGER_PROFILE_NAME_COLUMN visible:NO];
[self addColumnWithId:IDS_TASK_MANAGER_PHYSICAL_MEM_COLUMN visible:YES];
[self addColumnWithId:IDS_TASK_MANAGER_SHARED_MEM_COLUMN visible:NO];
[self addColumnWithId:IDS_TASK_MANAGER_PRIVATE_MEM_COLUMN visible:NO];
@@ -429,6 +432,9 @@
case IDS_TASK_MANAGER_PAGE_COLUMN: // Process
return base::SysUTF16ToNSString(model_->GetResourceTitle(row));
+ case IDS_TASK_MANAGER_PROFILE_NAME_COLUMN: // Profile Name
+ return base::SysUTF16ToNSString(model_->GetResourceProfileName(row));
+
case IDS_TASK_MANAGER_PRIVATE_MEM_COLUMN: // Memory
if (!model_->IsResourceFirstInGroup(row))
return @"";
« no previous file with comments | « chrome/browser/task_manager/task_manager_unittest.cc ('k') | chrome/browser/ui/cocoa/task_manager_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698