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_TASK_MANAGER_TASK_MANAGER_TABLE_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_TASK_MANAGER_TASK_MANAGER_TABLE_MODEL_H_ |
6 #define CHROME_BROWSER_UI_TASK_MANAGER_TASK_MANAGER_TABLE_MODEL_H_ | 6 #define CHROME_BROWSER_UI_TASK_MANAGER_TASK_MANAGER_TABLE_MODEL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #include "base/macros.h" | 12 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "base/values.h" | 13 #include "base/values.h" |
13 #include "chrome/browser/task_management/task_manager_observer.h" | 14 #include "chrome/browser/task_management/task_manager_observer.h" |
14 #include "ui/base/models/table_model.h" | 15 #include "ui/base/models/table_model.h" |
15 | 16 |
16 namespace task_management { | 17 namespace task_management { |
17 | 18 |
18 class TaskManagerValuesStringifier; | 19 class TaskManagerValuesStringifier; |
19 | 20 |
20 // Describes how the platform specific table view is sorted. | 21 // Describes how the platform specific table view is sorted. |
21 struct TableSortDescriptor { | 22 struct TableSortDescriptor { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 bool IsTaskFirstInGroup(int row_index) const; | 112 bool IsTaskFirstInGroup(int row_index) const; |
112 | 113 |
113 // The delegate that will be used to communicate with the platform-specific | 114 // The delegate that will be used to communicate with the platform-specific |
114 // TableView. | 115 // TableView. |
115 TableViewDelegate* table_view_delegate_; | 116 TableViewDelegate* table_view_delegate_; |
116 | 117 |
117 // Contains either the column settings retrieved from user preferences if it | 118 // Contains either the column settings retrieved from user preferences if it |
118 // exists, or the default column settings. | 119 // exists, or the default column settings. |
119 // The columns settings are the visible columns and the last sorted column | 120 // The columns settings are the visible columns and the last sorted column |
120 // and the direction of the sort. | 121 // and the direction of the sort. |
121 scoped_ptr<base::DictionaryValue> columns_settings_; | 122 std::unique_ptr<base::DictionaryValue> columns_settings_; |
122 | 123 |
123 // The table model observer that will be set by the table view of the task | 124 // The table model observer that will be set by the table view of the task |
124 // manager. | 125 // manager. |
125 ui::TableModelObserver* table_model_observer_; | 126 ui::TableModelObserver* table_model_observer_; |
126 | 127 |
127 // The sorted list of task IDs by process ID then by task ID. | 128 // The sorted list of task IDs by process ID then by task ID. |
128 std::vector<TaskId> tasks_; | 129 std::vector<TaskId> tasks_; |
129 | 130 |
130 // The owned task manager values stringifier that will be used to convert the | 131 // The owned task manager values stringifier that will be used to convert the |
131 // values to string16. | 132 // values to string16. |
132 scoped_ptr<TaskManagerValuesStringifier> stringifier_; | 133 std::unique_ptr<TaskManagerValuesStringifier> stringifier_; |
133 | 134 |
134 // The status of the flag #enable-nacl-debug. | 135 // The status of the flag #enable-nacl-debug. |
135 bool is_nacl_debugging_flag_enabled_; | 136 bool is_nacl_debugging_flag_enabled_; |
136 | 137 |
137 DISALLOW_COPY_AND_ASSIGN(TaskManagerTableModel); | 138 DISALLOW_COPY_AND_ASSIGN(TaskManagerTableModel); |
138 }; | 139 }; |
139 | 140 |
140 } // namespace task_management | 141 } // namespace task_management |
141 | 142 |
142 #endif // CHROME_BROWSER_UI_TASK_MANAGER_TASK_MANAGER_TABLE_MODEL_H_ | 143 #endif // CHROME_BROWSER_UI_TASK_MANAGER_TASK_MANAGER_TABLE_MODEL_H_ |
OLD | NEW |