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

Side by Side Diff: chrome/browser/ui/views/new_task_manager_view.h

Issue 1320563002: Task Manager Should remember the most recently enabled columns. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_UI_VIEWS_NEW_TASK_MANAGER_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_NEW_TASK_MANAGER_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_NEW_TASK_MANAGER_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_NEW_TASK_MANAGER_VIEW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "chrome/browser/ui/host_desktop.h" 10 #include "chrome/browser/ui/host_desktop.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 // Initializes the state of the always-on-top setting as the window is shown. 95 // Initializes the state of the always-on-top setting as the window is shown.
96 void InitAlwaysOnTopState(); 96 void InitAlwaysOnTopState();
97 97
98 // Activates the tab associated with the focused row. 98 // Activates the tab associated with the focused row.
99 void ActivateFocusedTab(); 99 void ActivateFocusedTab();
100 100
101 // Restores saved "always on top" state from a previous session. 101 // Restores saved "always on top" state from a previous session.
102 void RetriveSavedAlwaysOnTopState(); 102 void RetriveSavedAlwaysOnTopState();
103 103
104 // Restores the saved columns settings from a previous session into
105 // |columns_settings_| and updates the table view.
106 void RetrieveSavedColumnsSettingsAndUpdateTable();
107
108 // Stores the current values in |column_settings_| to the user prefs so that
109 // it can be restored later next time the task manager view is opened.
110 void StoreColumnsSettings();
111
104 scoped_ptr<NewTaskManagerView::TableModel> table_model_; 112 scoped_ptr<NewTaskManagerView::TableModel> table_model_;
105 113
106 scoped_ptr<views::MenuRunner> menu_runner_; 114 scoped_ptr<views::MenuRunner> menu_runner_;
107 115
116 // Contains either the column settings retrieved from user preferences if it
117 // exists, or the default column settings.
118 // The columns settings are the visible columns and the last sorted column
119 // and the direction of the sort.
120 scoped_ptr<base::DictionaryValue> columns_settings_;
121
108 // We need to own the text of the menu, the Windows API does not copy it. 122 // We need to own the text of the menu, the Windows API does not copy it.
109 base::string16 always_on_top_menu_text_; 123 base::string16 always_on_top_menu_text_;
110 124
111 views::LabelButton* kill_button_; 125 views::LabelButton* kill_button_;
112 views::Link* about_memory_link_; 126 views::Link* about_memory_link_;
113 views::TableView* tab_table_; 127 views::TableView* tab_table_;
114 views::View* tab_table_parent_; 128 views::View* tab_table_parent_;
115 129
116 // all possible columns, not necessarily visible 130 // all possible columns, not necessarily visible
117 std::vector<ui::TableColumn> columns_; 131 std::vector<ui::TableColumn> columns_;
118 132
119 // The host desktop type this task manager belongs to. 133 // The host desktop type this task manager belongs to.
120 const chrome::HostDesktopType desktop_type_; 134 const chrome::HostDesktopType desktop_type_;
121 135
122 // True when the Task Manager window should be shown on top of other windows. 136 // True when the Task Manager window should be shown on top of other windows.
123 bool is_always_on_top_; 137 bool is_always_on_top_;
124 138
125 DISALLOW_COPY_AND_ASSIGN(NewTaskManagerView); 139 DISALLOW_COPY_AND_ASSIGN(NewTaskManagerView);
126 }; 140 };
127 141
128 } // namespace task_management 142 } // namespace task_management
129 143
130 #endif // CHROME_BROWSER_UI_VIEWS_NEW_TASK_MANAGER_VIEW_H_ 144 #endif // CHROME_BROWSER_UI_VIEWS_NEW_TASK_MANAGER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698