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

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: thestig's 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.
105 void RetrieveSavedColumnsSettings();
106
107 // Updates the table view based on the values currently stored in
Lei Zhang 2015/08/28 22:47:45 nit: extra space before "stored"
afakhry 2015/08/29 00:30:30 Done.
108 // |columns_settings_|.
109 void UpdateTableFromColumnsSettings();
110
111 // Stores the current values in |column_settings_| to the user prefs so that
112 // it can be restored later next time the task manager view is opened.
113 void StoreColumnsSettings();
114
104 scoped_ptr<NewTaskManagerView::TableModel> table_model_; 115 scoped_ptr<NewTaskManagerView::TableModel> table_model_;
105 116
106 scoped_ptr<views::MenuRunner> menu_runner_; 117 scoped_ptr<views::MenuRunner> menu_runner_;
107 118
119 // Contains either the retrieved from user preferences columns settings if
Lei Zhang 2015/08/28 22:47:45 I have a bit of trouble parsing this sentence. How
afakhry 2015/08/29 00:30:30 Done.
120 // any, or it will contain the default columns settings.
121 // The columns settings are the visible columns and the last sorted column
122 // and the direction of the sort.
123 scoped_ptr<base::DictionaryValue> columns_settings_;
124
108 // We need to own the text of the menu, the Windows API does not copy it. 125 // We need to own the text of the menu, the Windows API does not copy it.
109 base::string16 always_on_top_menu_text_; 126 base::string16 always_on_top_menu_text_;
110 127
111 views::LabelButton* kill_button_; 128 views::LabelButton* kill_button_;
112 views::Link* about_memory_link_; 129 views::Link* about_memory_link_;
113 views::TableView* tab_table_; 130 views::TableView* tab_table_;
114 views::View* tab_table_parent_; 131 views::View* tab_table_parent_;
115 132
116 // all possible columns, not necessarily visible 133 // all possible columns, not necessarily visible
117 std::vector<ui::TableColumn> columns_; 134 std::vector<ui::TableColumn> columns_;
118 135
119 // The host desktop type this task manager belongs to. 136 // The host desktop type this task manager belongs to.
120 const chrome::HostDesktopType desktop_type_; 137 const chrome::HostDesktopType desktop_type_;
121 138
122 // True when the Task Manager window should be shown on top of other windows. 139 // True when the Task Manager window should be shown on top of other windows.
123 bool is_always_on_top_; 140 bool is_always_on_top_;
124 141
125 DISALLOW_COPY_AND_ASSIGN(NewTaskManagerView); 142 DISALLOW_COPY_AND_ASSIGN(NewTaskManagerView);
126 }; 143 };
127 144
128 } // namespace task_management 145 } // namespace task_management
129 146
130 #endif // CHROME_BROWSER_UI_VIEWS_NEW_TASK_MANAGER_VIEW_H_ 147 #endif // CHROME_BROWSER_UI_VIEWS_NEW_TASK_MANAGER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698