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 #ifndef CHROME_BROWSER_UI_WEBUI_TASK_MANAGER_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_TASK_MANAGER_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_TASK_MANAGER_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_TASK_MANAGER_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 #include "content/browser/webui/web_ui.h" | 10 #include "content/browser/webui/web_ui.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 void HandleKillProcess(const base::ListValue* indexes); | 39 void HandleKillProcess(const base::ListValue* indexes); |
40 | 40 |
41 // Callback for the "inspect" message. | 41 // Callback for the "inspect" message. |
42 void HandleInspect(const base::ListValue* resource_index); | 42 void HandleInspect(const base::ListValue* resource_index); |
43 | 43 |
44 void EnableTaskManager(const base::ListValue* indexes); | 44 void EnableTaskManager(const base::ListValue* indexes); |
45 void DisableTaskManager(const base::ListValue* indexes); | 45 void DisableTaskManager(const base::ListValue* indexes); |
46 void OpenAboutMemory(const base::ListValue* indexes); | 46 void OpenAboutMemory(const base::ListValue* indexes); |
47 | 47 |
48 private: | 48 private: |
| 49 bool is_alive(); |
| 50 |
49 // Models | 51 // Models |
50 TaskManager* task_manager_; | 52 TaskManager* task_manager_; |
51 TaskManagerModel* model_; | 53 TaskManagerModel* model_; |
52 | 54 |
53 bool is_enabled_; | 55 bool is_enabled_; |
54 | 56 |
55 // Table to cache the group index of the resource index. | 57 // Table to cache the group index of the resource index. |
56 std::vector<int> resource_to_group_table_; | 58 std::vector<int> resource_to_group_table_; |
57 | 59 |
58 // Invoked when group(s) are added/changed/removed. | 60 // Invoked when group(s) are added/changed/removed. |
59 // These method are called from OnItemAdded/-Changed/-Removed internally. | 61 // These method are called from OnItemAdded/-Changed/-Removed internally. |
60 void OnGroupAdded(int start, int length); | 62 void OnGroupAdded(int start, int length); |
61 void OnGroupChanged(int start, int length); | 63 void OnGroupChanged(int start, int length); |
62 void OnGroupRemoved(int start, int length); | 64 void OnGroupRemoved(int start, int length); |
63 | 65 |
64 // Updates |resource_to_group_table_|. | 66 // Updates |resource_to_group_table_|. |
65 void UpdateResourceGroupTable(int start, int length); | 67 void UpdateResourceGroupTable(int start, int length); |
66 | 68 |
67 DISALLOW_COPY_AND_ASSIGN(TaskManagerHandler); | 69 DISALLOW_COPY_AND_ASSIGN(TaskManagerHandler); |
68 }; | 70 }; |
69 | 71 |
70 #endif // CHROME_BROWSER_UI_WEBUI_TASK_MANAGER_HANDLER_H_ | 72 #endif // CHROME_BROWSER_UI_WEBUI_TASK_MANAGER_HANDLER_H_ |
OLD | NEW |