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

Unified Diff: chrome/browser/ui/views/task_manager_view.cc

Issue 1700873002: Remove HostDesktopType from task manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-25
Patch Set: Created 4 years, 10 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 | « chrome/browser/ui/views/new_task_manager_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/task_manager_view.cc
diff --git a/chrome/browser/ui/views/task_manager_view.cc b/chrome/browser/ui/views/task_manager_view.cc
index 9dbc0fdb7b6dd66e23d22c6c0744c4895e4cfefa..5d2cc610891f7dba3c29224640f901d5a456646d 100644
--- a/chrome/browser/ui/views/task_manager_view.cc
+++ b/chrome/browser/ui/views/task_manager_view.cc
@@ -154,7 +154,7 @@ class TaskManagerView : public views::ButtonListener,
public views::ContextMenuController,
public ui::SimpleMenuModel::Delegate {
public:
- explicit TaskManagerView(chrome::HostDesktopType desktop_type);
+ TaskManagerView();
~TaskManagerView() override;
// Shows the Task Manager window, or re-activates an existing one.
@@ -234,9 +234,6 @@ class TaskManagerView : public views::ButtonListener,
// True when the Task Manager window should be shown on top of other windows.
bool is_always_on_top_;
- // The host desktop type this task manager belongs to.
- const chrome::HostDesktopType desktop_type_;
-
// We need to own the text of the menu, the Windows API does not copy it.
base::string16 always_on_top_menu_text_;
@@ -252,16 +249,14 @@ class TaskManagerView : public views::ButtonListener,
// static
TaskManagerView* TaskManagerView::instance_ = NULL;
-
-TaskManagerView::TaskManagerView(chrome::HostDesktopType desktop_type)
+TaskManagerView::TaskManagerView()
: kill_button_(NULL),
about_memory_link_(NULL),
tab_table_(NULL),
tab_table_parent_(NULL),
task_manager_(TaskManager::GetInstance()),
model_(TaskManager::GetInstance()->model()),
- is_always_on_top_(false),
- desktop_type_(desktop_type) {
+ is_always_on_top_(false) {
Init();
}
@@ -451,17 +446,12 @@ bool TaskManagerView::AcceleratorPressed(const ui::Accelerator& accelerator) {
// static
void TaskManagerView::Show(Browser* browser) {
- // In ash we can come here through the ChromeShellDelegate. If there is no
- // browser window at that time of the call, browser could be passed as NULL.
- const chrome::HostDesktopType desktop_type =
- browser ? browser->host_desktop_type() : chrome::HOST_DESKTOP_TYPE_ASH;
-
if (instance_) {
// If there's a Task manager window open already, just activate it.
instance_->GetWidget()->Activate();
return;
}
- instance_ = new TaskManagerView(desktop_type);
+ instance_ = new TaskManagerView();
gfx::NativeWindow window =
browser ? browser->window()->GetNativeWindow() : NULL;
#if defined(USE_ASH)
@@ -582,7 +572,7 @@ void TaskManagerView::OnKeyDown(ui::KeyboardCode keycode) {
void TaskManagerView::LinkClicked(views::Link* source, int event_flags) {
DCHECK_EQ(about_memory_link_, source);
- task_manager_->OpenAboutMemory(desktop_type_);
+ task_manager_->OpenAboutMemory();
}
void TaskManagerView::ShowContextMenuForView(views::View* source,
« no previous file with comments | « chrome/browser/ui/views/new_task_manager_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698