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

Side by Side Diff: views/controls/table/group_table_view.h

Issue 4987001: Implement new task manager mocks on windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated per review feedback Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/task_manager_view.cc ('k') | views/controls/table/group_table_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 VIEWS_CONTROLS_TABLE_GROUP_TABLE_VIEW_H_ 5 #ifndef VIEWS_CONTROLS_TABLE_GROUP_TABLE_VIEW_H_
6 #define VIEWS_CONTROLS_TABLE_GROUP_TABLE_VIEW_H_ 6 #define VIEWS_CONTROLS_TABLE_GROUP_TABLE_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "app/table_model.h" 9 #include "app/table_model.h"
10 #include "base/task.h" 10 #include "base/task.h"
(...skipping 19 matching lines...) Expand all
30 }; 30 };
31 31
32 class GroupTableView : public TableView { 32 class GroupTableView : public TableView {
33 public: 33 public:
34 // The view class name. 34 // The view class name.
35 static const char kViewClassName[]; 35 static const char kViewClassName[];
36 36
37 GroupTableView(GroupTableModel* model, 37 GroupTableView(GroupTableModel* model,
38 const std::vector<TableColumn>& columns, 38 const std::vector<TableColumn>& columns,
39 TableTypes table_type, bool single_selection, 39 TableTypes table_type, bool single_selection,
40 bool resizable_columns, bool autosize_columns); 40 bool resizable_columns, bool autosize_columns,
41 bool draw_group_separators);
41 virtual ~GroupTableView(); 42 virtual ~GroupTableView();
42 43
43 virtual std::string GetClassName() const; 44 virtual std::string GetClassName() const;
44 45
45 protected: 46 protected:
46 // Notification from the ListView that the selected state of an item has 47 // Notification from the ListView that the selected state of an item has
47 // changed. 48 // changed.
48 void OnSelectedStateChanged(); 49 void OnSelectedStateChanged();
49 50
50 // Extra-painting required to draw the separator line between groups. 51 // Extra-painting required to draw the separator line between groups.
(...skipping 12 matching lines...) Expand all
63 64
64 // Updates model_index_to_range_start_map_ from the model. 65 // Updates model_index_to_range_start_map_ from the model.
65 virtual void PrepareForSort(); 66 virtual void PrepareForSort();
66 67
67 private: 68 private:
68 // Make the selection of group consistent. 69 // Make the selection of group consistent.
69 void SyncSelection(); 70 void SyncSelection();
70 71
71 GroupTableModel* model_; 72 GroupTableModel* model_;
72 73
74 // If true, draw separators between groups.
75 bool draw_group_separators_;
76
73 // A factory to make the selection consistent among groups. 77 // A factory to make the selection consistent among groups.
74 ScopedRunnableMethodFactory<GroupTableView> sync_selection_factory_; 78 ScopedRunnableMethodFactory<GroupTableView> sync_selection_factory_;
75 79
76 // Maps from model row to start of group. 80 // Maps from model row to start of group.
77 std::map<int,int> model_index_to_range_start_map_; 81 std::map<int,int> model_index_to_range_start_map_;
78 82
79 DISALLOW_COPY_AND_ASSIGN(GroupTableView); 83 DISALLOW_COPY_AND_ASSIGN(GroupTableView);
80 }; 84 };
81 85
82 } // namespace views 86 } // namespace views
83 87
84 #endif // VIEWS_CONTROLS_TABLE_GROUP_TABLE_VIEW_H_ 88 #endif // VIEWS_CONTROLS_TABLE_GROUP_TABLE_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/task_manager_view.cc ('k') | views/controls/table/group_table_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698