diff options
-rw-r--r-- | chrome/browser/cocoa/task_manager_mac.h | 3 | ||||
-rw-r--r-- | chrome/browser/cocoa/task_manager_mac.mm | 13 |
2 files changed, 13 insertions, 3 deletions
diff --git a/chrome/browser/cocoa/task_manager_mac.h b/chrome/browser/cocoa/task_manager_mac.h index 07f3fb2..b0e1481 100644 --- a/chrome/browser/cocoa/task_manager_mac.h +++ b/chrome/browser/cocoa/task_manager_mac.h @@ -30,6 +30,9 @@ // Callback for "End process" button. - (IBAction)killSelectedProcesses:(id)sender; + +// Callback for double clicks on the table. +- (void)selectDoubleClickedTab:(id)sender; @end // This class listens to task changed events sent by chrome. diff --git a/chrome/browser/cocoa/task_manager_mac.mm b/chrome/browser/cocoa/task_manager_mac.mm index f03ad05..e9808dc 100644 --- a/chrome/browser/cocoa/task_manager_mac.mm +++ b/chrome/browser/cocoa/task_manager_mac.mm @@ -14,13 +14,11 @@ // TODO(thakis): Autoremember window size/pos (and selected columns?) // TODO(thakis): Column sort comparator -// TODO(thakis): Double-clicking a tab should activate that tab // TODO(thakis): Clicking column header doesn't sort -// TODO(thakis): Double-clicking a row seems to do something on win/linux // TODO(thakis): On window close, stop updating // TODO(thakis): Favicons in rows // TODO(thakis): Default sort column -// TODO(thakis): Metrics are all wrong (some fixed when about:memory lands?) +// TODO(thakis): Metrics for all processes except browser process are missing. @interface TaskManagerWindowController (Private) - (void)addColumnWithId:(int)columnId visible:(BOOL)isVisible; @@ -65,10 +63,19 @@ } } +- (void)selectDoubleClickedTab:(id)sender { + NSInteger row = [tableView_ clickedRow]; + if (row < 0) + return; // Happens e.g. if the table header is double-clicked. + taskManager_->ActivateProcess(row); +} + - (void)awakeFromNib { [self setUpTableColumns]; [self setUpTableHeaderContextMenu]; [self adjustEndProcessButton]; + + [tableView_ setDoubleAction:@selector(selectDoubleClickedTab:)]; } // Adds a column which has the given string id as title. |isVisible| specifies |