OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/task_manager/task_manager.h" | 5 #include "chrome/browser/task_manager/task_manager.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/metrics/stats_table.h" | 9 #include "base/metrics/stats_table.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 tab_table_->set_context_menu_controller(this); | 457 tab_table_->set_context_menu_controller(this); |
458 set_context_menu_controller(this); | 458 set_context_menu_controller(this); |
459 // If we're running with --purge-memory-button, add a "Purge memory" button. | 459 // If we're running with --purge-memory-button, add a "Purge memory" button. |
460 if (CommandLine::ForCurrentProcess()->HasSwitch( | 460 if (CommandLine::ForCurrentProcess()->HasSwitch( |
461 switches::kPurgeMemoryButton)) { | 461 switches::kPurgeMemoryButton)) { |
462 purge_memory_button_ = new views::NativeTextButton(this, | 462 purge_memory_button_ = new views::NativeTextButton(this, |
463 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_PURGE_MEMORY)); | 463 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_PURGE_MEMORY)); |
464 } | 464 } |
465 kill_button_ = new views::NativeTextButton( | 465 kill_button_ = new views::NativeTextButton( |
466 this, l10n_util::GetStringUTF16(IDS_TASK_MANAGER_KILL)); | 466 this, l10n_util::GetStringUTF16(IDS_TASK_MANAGER_KILL)); |
467 kill_button_->AddAccelerator(ui::Accelerator(ui::VKEY_E, false, false, | 467 kill_button_->AddAccelerator(ui::Accelerator(ui::VKEY_E, ui::EF_NONE)); |
468 false)); | |
469 kill_button_->SetAccessibleKeyboardShortcut(L"E"); | 468 kill_button_->SetAccessibleKeyboardShortcut(L"E"); |
470 kill_button_->set_prefix_type(views::TextButtonBase::PREFIX_SHOW); | 469 kill_button_->set_prefix_type(views::TextButtonBase::PREFIX_SHOW); |
471 about_memory_link_ = new views::Link( | 470 about_memory_link_ = new views::Link( |
472 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_ABOUT_MEMORY_LINK)); | 471 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_ABOUT_MEMORY_LINK)); |
473 about_memory_link_->set_listener(this); | 472 about_memory_link_->set_listener(this); |
474 | 473 |
475 // Makes sure our state is consistent. | 474 // Makes sure our state is consistent. |
476 OnSelectionChanged(); | 475 OnSelectionChanged(); |
477 } | 476 } |
478 | 477 |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 // Declared in browser_dialogs.h so others don't need to depend on our header. | 793 // Declared in browser_dialogs.h so others don't need to depend on our header. |
795 void ShowTaskManager() { | 794 void ShowTaskManager() { |
796 TaskManagerView::Show(false); | 795 TaskManagerView::Show(false); |
797 } | 796 } |
798 | 797 |
799 void ShowBackgroundPages() { | 798 void ShowBackgroundPages() { |
800 TaskManagerView::Show(true); | 799 TaskManagerView::Show(true); |
801 } | 800 } |
802 | 801 |
803 } // namespace browser | 802 } // namespace browser |
OLD | NEW |