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

Unified Diff: chrome/browser/task_manager.cc

Issue 99079: Allow users to kill tasks by keystroke 'E'. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_manager.cc
===================================================================
--- chrome/browser/task_manager.cc (revision 14654)
+++ chrome/browser/task_manager.cc (working copy)
@@ -784,6 +784,10 @@
SetContextMenuController(this);
kill_button_.reset(new views::NativeButton(
this, l10n_util::GetString(IDS_TASK_MANAGER_KILL)));
+ // TODO(hamaji): Use accelerator once the bug in FocusManager fixed.
+ // http://crbug.com/11073
+ // kill_button_->AddAccelerator(views::Accelerator('E', false, false, false));
+ kill_button_->SetAccessibleKeyboardShortcut(L"E");
about_memory_link_.reset(new views::Link(
l10n_util::GetString(IDS_TASK_MANAGER_ABOUT_MEMORY_LINK)));
about_memory_link_->SetController(this);
@@ -916,6 +920,8 @@
void TaskManagerContents::OnKeyDown(unsigned short virtual_keycode) {
if (virtual_keycode == VK_RETURN)
task_manager_->ActivateFocusedTab();
+ else if (virtual_keycode == 'E')
+ task_manager_->KillSelectedProcesses();
}
// views::LinkController implementation
@@ -1009,6 +1015,8 @@
iter != selection.end(); ++iter) {
HANDLE process = table_model_->GetProcessAt(*iter);
DCHECK(process);
+ if (process == GetCurrentProcess())
+ continue;
TerminateProcess(process, 0);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698