OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/webui/task_manager_handler.h" | 5 #include "chrome/browser/ui/webui/task_manager_handler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 185 |
186 int index = tm->GetResourceIndexForGroup(group_index, 0); | 186 int index = tm->GetResourceIndexForGroup(group_index, 0); |
187 std::pair<int, int> group_range; | 187 std::pair<int, int> group_range; |
188 group_range = tm->GetGroupRangeForResource(index); | 188 group_range = tm->GetGroupRangeForResource(index); |
189 int length = group_range.second; | 189 int length = group_range.second; |
190 | 190 |
191 // Forces to set following 3 columns regardless of |enable_columns|. | 191 // Forces to set following 3 columns regardless of |enable_columns|. |
192 val->SetInteger("index", index); | 192 val->SetInteger("index", index); |
193 val->SetBoolean("isBackgroundResource", | 193 val->SetBoolean("isBackgroundResource", |
194 tm->IsBackgroundResource(index)); | 194 tm->IsBackgroundResource(index)); |
| 195 CreateGroupColumnList(tm, "processId", index, 1, val); |
| 196 CreateGroupColumnList(tm, "type", index, length, val); |
195 CreateGroupColumnList(tm, "uniqueId", index, length, val); | 197 CreateGroupColumnList(tm, "uniqueId", index, length, val); |
196 CreateGroupColumnList(tm, "processId", index, 1, val); | |
197 | 198 |
198 for (size_t i = 0; i < arraysize(kColumnsList); ++i) { | 199 for (size_t i = 0; i < arraysize(kColumnsList); ++i) { |
199 const std::string column_id = kColumnsList[i].column_id; | 200 const std::string column_id = kColumnsList[i].column_id; |
200 | 201 |
201 if (columns.find(column_id) == columns.end()) | 202 if (columns.find(column_id) == columns.end()) |
202 continue; | 203 continue; |
203 | 204 |
204 int column_length = kColumnsList[i].has_multiple_data ? length : 1; | 205 int column_length = kColumnsList[i].has_multiple_data ? length : 1; |
205 CreateGroupColumnList(tm, column_id, index, column_length, val); | 206 CreateGroupColumnList(tm, column_id, index, column_length, val); |
206 | 207 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 void TaskManagerHandler::OnGroupAdded(const int group_start, | 398 void TaskManagerHandler::OnGroupAdded(const int group_start, |
398 const int group_length) { | 399 const int group_length) { |
399 } | 400 } |
400 | 401 |
401 void TaskManagerHandler::OnGroupRemoved(const int group_start, | 402 void TaskManagerHandler::OnGroupRemoved(const int group_start, |
402 const int group_length) { | 403 const int group_length) { |
403 } | 404 } |
404 | 405 |
405 void TaskManagerHandler::OnReadyPeriodicalUpdate() { | 406 void TaskManagerHandler::OnReadyPeriodicalUpdate() { |
406 } | 407 } |
OLD | NEW |