summaryrefslogtreecommitdiffstats
path: root/chrome/browser/task_manager.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-27 22:55:05 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-27 22:55:05 +0000
commitb896d838926f0b8defa231665bae020b11a3dd7f (patch)
tree8175c573d540beeb4184839feadbb3383215bcb2 /chrome/browser/task_manager.cc
parentef2cb988a0cb74f402e666d3309fb579e39967fc (diff)
downloadchromium_src-b896d838926f0b8defa231665bae020b11a3dd7f.zip
chromium_src-b896d838926f0b8defa231665bae020b11a3dd7f.tar.gz
chromium_src-b896d838926f0b8defa231665bae020b11a3dd7f.tar.bz2
Landing Hamaji's patch.
See http://codereview.chromium.org/93135 Review URL: http://codereview.chromium.org/99079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14678 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/task_manager.cc')
-rw-r--r--chrome/browser/task_manager.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/task_manager.cc b/chrome/browser/task_manager.cc
index b932970..e411c75 100644
--- a/chrome/browser/task_manager.cc
+++ b/chrome/browser/task_manager.cc
@@ -784,6 +784,10 @@ void TaskManagerContents::Init(TaskManagerTableModel* table_model) {
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::OnDoubleClick() {
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 @@ void TaskManager::KillSelectedProcesses() {
iter != selection.end(); ++iter) {
HANDLE process = table_model_->GetProcessAt(*iter);
DCHECK(process);
+ if (process == GetCurrentProcess())
+ continue;
TerminateProcess(process, 0);
}
}