Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 column visibility from a previous session. | |
| 105 void RetrieveSavedColumnVisibility(); | |
| 106 | |
| 107 // Updates the visibility of the columns in the table view based on the values | |
| 108 // stored in |column_visibility_settings_|. | |
| 109 void UpdateColumnVisibility(); | |
| 110 | |
| 111 // Stores the current values of columns visibility in | |
| 112 // |column_visibility_settings_| to the user prefs. | |
| 113 void StoreColumnVisibility(); | |
| 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 visibility | |
| 120 // settings if any, otherwise it will contain the default column visibility. | |
| 121 scoped_ptr<base::DictionaryValue> column_visibility_settings_; | |
|
Lei Zhang
2015/08/27 01:10:44
Does this need to be a scoped_ptr? It's always goi
afakhry
2015/08/27 19:56:52
It has to be a scoped_ptr<>. DictionaryValue is ow
| |
| 122 | |
| 108 // We need to own the text of the menu, the Windows API does not copy it. | 123 // We need to own the text of the menu, the Windows API does not copy it. |
| 109 base::string16 always_on_top_menu_text_; | 124 base::string16 always_on_top_menu_text_; |
| 110 | 125 |
| 111 views::LabelButton* kill_button_; | 126 views::LabelButton* kill_button_; |
| 112 views::Link* about_memory_link_; | 127 views::Link* about_memory_link_; |
| 113 views::TableView* tab_table_; | 128 views::TableView* tab_table_; |
| 114 views::View* tab_table_parent_; | 129 views::View* tab_table_parent_; |
| 115 | 130 |
| 116 // all possible columns, not necessarily visible | 131 // all possible columns, not necessarily visible |
| 117 std::vector<ui::TableColumn> columns_; | 132 std::vector<ui::TableColumn> columns_; |
| 118 | 133 |
| 119 // The host desktop type this task manager belongs to. | 134 // The host desktop type this task manager belongs to. |
| 120 const chrome::HostDesktopType desktop_type_; | 135 const chrome::HostDesktopType desktop_type_; |
| 121 | 136 |
| 122 // True when the Task Manager window should be shown on top of other windows. | 137 // True when the Task Manager window should be shown on top of other windows. |
| 123 bool is_always_on_top_; | 138 bool is_always_on_top_; |
| 124 | 139 |
| 125 DISALLOW_COPY_AND_ASSIGN(NewTaskManagerView); | 140 DISALLOW_COPY_AND_ASSIGN(NewTaskManagerView); |
| 126 }; | 141 }; |
| 127 | 142 |
| 128 } // namespace task_management | 143 } // namespace task_management |
| 129 | 144 |
| 130 #endif // CHROME_BROWSER_UI_VIEWS_NEW_TASK_MANAGER_VIEW_H_ | 145 #endif // CHROME_BROWSER_UI_VIEWS_NEW_TASK_MANAGER_VIEW_H_ |
| OLD | NEW |