| 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/task_manager_handler.h" | 5 #include "chrome/browser/ui/webui/task_manager/task_manager_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
| 12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/task_manager/task_manager.h" | 15 #include "chrome/browser/task_manager/task_manager.h" |
| 16 #include "chrome/browser/ui/host_desktop.h" | 16 #include "chrome/browser/ui/host_desktop.h" |
| 17 #include "chrome/common/chrome_notification_types.h" | 17 #include "chrome/common/chrome_notification_types.h" |
| 18 #include "content/public/browser/notification_service.h" | 18 #include "content/public/browser/notification_service.h" |
| 19 #include "content/public/browser/notification_source.h" | 19 #include "content/public/browser/notification_source.h" |
| 20 #include "content/public/browser/render_view_host.h" | 20 #include "content/public/browser/render_view_host.h" |
| 21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
| 22 #include "content/public/browser/web_ui.h" | 22 #include "content/public/browser/web_ui.h" |
| 23 #include "ui/gfx/image/image_skia.h" | 23 #include "ui/gfx/image/image_skia.h" |
| 24 #include "ui/webui/web_ui_util.h" | 24 #include "ui/webui/web_ui_util.h" |
| 25 #include "webkit/common/webpreferences.h" | 25 #include "webkit/glue/webpreferences.h" |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 struct ColumnType { | 29 struct ColumnType { |
| 30 const char* column_id; | 30 const char* column_id; |
| 31 // Whether the column has the real value separately or not, instead of the | 31 // Whether the column has the real value separately or not, instead of the |
| 32 // formatted value to display. | 32 // formatted value to display. |
| 33 const bool has_real_value; | 33 const bool has_real_value; |
| 34 // Whether the column has single datum or multiple data in each group. | 34 // Whether the column has single datum or multiple data in each group. |
| 35 const bool has_multiple_data; | 35 const bool has_multiple_data; |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 return Value::CreateDoubleValue(v8_memory); | 419 return Value::CreateDoubleValue(v8_memory); |
| 420 } | 420 } |
| 421 if (column_name == "canInspect") | 421 if (column_name == "canInspect") |
| 422 return Value::CreateBooleanValue(model_->CanInspect(i)); | 422 return Value::CreateBooleanValue(model_->CanInspect(i)); |
| 423 if (column_name == "canActivate") | 423 if (column_name == "canActivate") |
| 424 return Value::CreateBooleanValue(model_->CanActivate(i)); | 424 return Value::CreateBooleanValue(model_->CanActivate(i)); |
| 425 | 425 |
| 426 NOTREACHED(); | 426 NOTREACHED(); |
| 427 return NULL; | 427 return NULL; |
| 428 } | 428 } |
| OLD | NEW |