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

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

Issue 521005: Mac: Double-clicking tabs in the task manager should focus that tab. (Closed)
Patch Set: Created 11 years 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/cocoa/task_manager_mac.mm
diff --git a/chrome/browser/cocoa/task_manager_mac.mm b/chrome/browser/cocoa/task_manager_mac.mm
index f03ad052e72d4b8a35311616f311c4e089e66243..e9808dc729616b688fb4a94bd5fc24ee14d90a9f 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:)];
Jens Alfke 2009/12/23 19:38:48 I would set the tableView_'s target too for safety
Nico 2009/12/23 19:45:14 If i stick to what the documentation says ("For th
}
// Adds a column which has the given string id as title. |isVisible| specifies
« chrome/browser/cocoa/task_manager_mac.h ('K') | « chrome/browser/cocoa/task_manager_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698