| 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> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "chrome/browser/task_management/task_manager_observer.h" | 14 #include "chrome/browser/task_management/task_manager_observer.h" |
| 15 #include "ui/base/models/table_model.h" | 15 #include "ui/base/models/table_model.h" |
| 16 | 16 |
| 17 namespace task_manager { | |
| 18 namespace browsertest_util { | |
| 19 class TaskManagerTesterImpl; | |
| 20 } | |
| 21 } | |
| 22 | |
| 23 namespace task_management { | 17 namespace task_management { |
| 24 | 18 |
| 25 class TaskManagerValuesStringifier; | 19 class TaskManagerValuesStringifier; |
| 26 | 20 |
| 27 // Describes how the platform specific table view is sorted. | 21 // Describes how the platform specific table view is sorted. |
| 28 struct TableSortDescriptor { | 22 struct TableSortDescriptor { |
| 29 TableSortDescriptor(); | 23 TableSortDescriptor(); |
| 30 TableSortDescriptor(int col_id, bool ascending); | 24 TableSortDescriptor(int col_id, bool ascending); |
| 31 | 25 |
| 32 // The ID of the sorted column, -1 if the table is not sorted. | 26 // The ID of the sorted column, -1 if the table is not sorted. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 // |columns_settings_| and updates the table view. | 94 // |columns_settings_| and updates the table view. |
| 101 void RetrieveSavedColumnsSettingsAndUpdateTable(); | 95 void RetrieveSavedColumnsSettingsAndUpdateTable(); |
| 102 | 96 |
| 103 // Stores the current values in |column_settings_| to the user prefs so that | 97 // Stores the current values in |column_settings_| to the user prefs so that |
| 104 // it can be restored later next time the task manager view is opened. | 98 // it can be restored later next time the task manager view is opened. |
| 105 void StoreColumnsSettings(); | 99 void StoreColumnsSettings(); |
| 106 | 100 |
| 107 void ToggleColumnVisibility(int column_id); | 101 void ToggleColumnVisibility(int column_id); |
| 108 | 102 |
| 109 private: | 103 private: |
| 110 friend class task_manager::browsertest_util::TaskManagerTesterImpl; | 104 friend class TaskManagerTesterImpl; |
| 111 | 105 |
| 112 // Start / stop observing the task manager. | 106 // Start / stop observing the task manager. |
| 113 void StartUpdating(); | 107 void StartUpdating(); |
| 114 void StopUpdating(); | 108 void StopUpdating(); |
| 115 | 109 |
| 116 void OnRefresh(); | 110 void OnRefresh(); |
| 117 | 111 |
| 118 // Checks whether the task at |row_index| is the first task in its process | 112 // Checks whether the task at |row_index| is the first task in its process |
| 119 // group of tasks. | 113 // group of tasks. |
| 120 bool IsTaskFirstInGroup(int row_index) const; | 114 bool IsTaskFirstInGroup(int row_index) const; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 142 | 136 |
| 143 // The status of the flag #enable-nacl-debug. | 137 // The status of the flag #enable-nacl-debug. |
| 144 bool is_nacl_debugging_flag_enabled_; | 138 bool is_nacl_debugging_flag_enabled_; |
| 145 | 139 |
| 146 DISALLOW_COPY_AND_ASSIGN(TaskManagerTableModel); | 140 DISALLOW_COPY_AND_ASSIGN(TaskManagerTableModel); |
| 147 }; | 141 }; |
| 148 | 142 |
| 149 } // namespace task_management | 143 } // namespace task_management |
| 150 | 144 |
| 151 #endif // CHROME_BROWSER_UI_TASK_MANAGER_TASK_MANAGER_TABLE_MODEL_H_ | 145 #endif // CHROME_BROWSER_UI_TASK_MANAGER_TASK_MANAGER_TABLE_MODEL_H_ |
| OLD | NEW |