Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_TASK_MANAGER_TASK_MANAGER_COLUMNS_H_ | |
| 6 #define CHROME_BROWSER_UI_TASK_MANAGER_TASK_MANAGER_COLUMNS_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
|
Lei Zhang
2015/09/24 05:33:57
nit: no macros here
afakhry
2015/09/25 16:39:49
Done.
| |
| 9 #include "ui/base/models/table_model.h" | |
| 10 | |
| 11 namespace task_management { | |
| 12 | |
| 13 // A collection of data to be used in the construction of a task manager table | |
| 14 // column. | |
| 15 struct TableColumnData { | |
| 16 // The generated ID of the column. These can change from one build to another. | |
| 17 // Their values are controlled by the generation from generated_resources.grd. | |
| 18 int id; | |
| 19 | |
| 20 // The alignment of the text displayed in this column. | |
| 21 ui::TableColumn::Alignment align; | |
| 22 | |
| 23 // |width| and |percent| used to define the size of the column. See | |
| 24 // ui::TableColumn::width and ui::TableColumn::percent for details. | |
| 25 int width; | |
| 26 float percent; | |
| 27 | |
| 28 // min and max widths used for Mac's implementation and are ignored on Views. | |
| 29 // If |max_width| is -1, a value of 1.5 * |min_width| will be used. | |
| 30 int min_width; | |
| 31 int max_width; | |
| 32 | |
| 33 // Is the column sortable. | |
| 34 bool sortable; | |
| 35 | |
| 36 // Is the initial sort order ascending? | |
| 37 bool initial_sort_is_ascending; | |
| 38 | |
| 39 // The default visibility of this column at startup of the table if no | |
| 40 // visibility is stored for it in the prefs. | |
| 41 bool default_visibility; | |
| 42 }; | |
| 43 | |
| 44 // The task manager table columns and their properties. | |
| 45 extern const TableColumnData kColumns[]; | |
| 46 extern const size_t kColumnsSize; | |
| 47 | |
| 48 // Session Restore Keys. | |
| 49 extern const char kSortColumnIdKey[]; | |
| 50 extern const char kSortIsAscendingKey[]; | |
| 51 | |
| 52 // Returns the |column_id| as a string value to be used as keys in the user | |
| 53 // preferences. | |
| 54 std::string GetColumnIdAsString(int column_id); | |
| 55 | |
| 56 } // namespace task_management | |
| 57 | |
|
Lei Zhang
2015/09/24 05:33:57
nit: extra blank line
afakhry
2015/09/25 16:39:49
Done.
| |
| 58 | |
| 59 #endif // CHROME_BROWSER_UI_TASK_MANAGER_TASK_MANAGER_COLUMNS_H_ | |
| OLD | NEW |