| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
| 11 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/task_manager/task_manager.h" | 14 #include "chrome/browser/task_manager/task_manager.h" |
| 15 #include "chrome/browser/ui/webui/web_ui_util.h" | 15 #include "chrome/browser/ui/webui/web_ui_util.h" |
| 16 #include "chrome/common/chrome_notification_types.h" | 16 #include "chrome/common/chrome_notification_types.h" |
| 17 #include "content/browser/renderer_host/render_view_host.h" | 17 #include "content/browser/renderer_host/render_view_host.h" |
| 18 #include "content/browser/renderer_host/render_view_host_delegate.h" | 18 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 19 #include "content/browser/webui/web_ui.h" |
| 19 #include "content/public/browser/notification_service.h" | 20 #include "content/public/browser/notification_service.h" |
| 20 #include "content/public/browser/notification_source.h" | 21 #include "content/public/browser/notification_source.h" |
| 21 #include "content/public/browser/web_contents.h" | 22 #include "content/public/browser/web_contents.h" |
| 22 #include "third_party/skia/include/core/SkBitmap.h" | 23 #include "third_party/skia/include/core/SkBitmap.h" |
| 23 #include "webkit/glue/webpreferences.h" | 24 #include "webkit/glue/webpreferences.h" |
| 24 | 25 |
| 25 namespace { | 26 namespace { |
| 26 | 27 |
| 27 static Value* CreateColumnValue(const TaskManagerModel* tm, | 28 static Value* CreateColumnValue(const TaskManagerModel* tm, |
| 28 const std::string column_name, | 29 const std::string column_name, |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 } | 467 } |
| 467 } | 468 } |
| 468 | 469 |
| 469 void TaskManagerHandler::OnGroupRemoved(const int group_start, | 470 void TaskManagerHandler::OnGroupRemoved(const int group_start, |
| 470 const int group_length) { | 471 const int group_length) { |
| 471 base::FundamentalValue start_value(group_start); | 472 base::FundamentalValue start_value(group_start); |
| 472 base::FundamentalValue length_value(group_length); | 473 base::FundamentalValue length_value(group_length); |
| 473 if (is_enabled_ && is_alive()) | 474 if (is_enabled_ && is_alive()) |
| 474 web_ui()->CallJavascriptFunction("taskRemoved", start_value, length_value); | 475 web_ui()->CallJavascriptFunction("taskRemoved", start_value, length_value); |
| 475 } | 476 } |
| OLD | NEW |