diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-23 19:39:01 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-23 19:39:01 +0000 |
commit | 20fbc692a57fdc985471a31e99c26e3f1a66fb62 (patch) | |
tree | c0b107e001272d057b6c48129ba258ad55247150 /chrome/browser/cocoa/task_manager_mac.mm | |
parent | 3846753b6d1c26bfdc37a023857895792e42a9b5 (diff) | |
download | chromium_src-20fbc692a57fdc985471a31e99c26e3f1a66fb62.zip chromium_src-20fbc692a57fdc985471a31e99c26e3f1a66fb62.tar.gz chromium_src-20fbc692a57fdc985471a31e99c26e3f1a66fb62.tar.bz2 |
Mac: Double-clicking tabs in the task manager should focus that tab.
BUG=13156
TEST=Hook up task manager. Open it, double-click tabs. They should become active.
Review URL: http://codereview.chromium.org/521005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35225 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/task_manager_mac.mm')
-rw-r--r-- | chrome/browser/cocoa/task_manager_mac.mm | 13 |
1 files changed, 10 insertions, 3 deletions
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 |