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

Side by Side Diff: chrome/browser/ui/webui/task_manager_handler.h

Issue 8391039: TaskManager: introduce Resource::(Can)Inspect; support tabs, apps, extensions and notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self-review. Created 9 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
OLDNEW
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 18 matching lines...) Expand all
29 virtual void OnItemsChanged(int start, int length) OVERRIDE; 29 virtual void OnItemsChanged(int start, int length) OVERRIDE;
30 // Invoked when new items are added. 30 // Invoked when new items are added.
31 virtual void OnItemsAdded(int start, int length) OVERRIDE; 31 virtual void OnItemsAdded(int start, int length) OVERRIDE;
32 // Invoked when a range of items has been removed. 32 // Invoked when a range of items has been removed.
33 virtual void OnItemsRemoved(int start, int length) OVERRIDE; 33 virtual void OnItemsRemoved(int start, int length) OVERRIDE;
34 34
35 // WebUIMessageHandler implementation. 35 // WebUIMessageHandler implementation.
36 virtual void RegisterMessages() OVERRIDE; 36 virtual void RegisterMessages() OVERRIDE;
37 37
38 // Callback for the "killProcess" message. 38 // Callback for the "killProcess" message.
39 void HandleKillProcess(const base::ListValue* args); 39 void HandleKillProcess(const base::ListValue* indexes);
40
41 // Callback for the "inspect" message.
42 void HandleInspect(const base::ListValue* resource_index);
40 43
41 void EnableTaskManager(const base::ListValue* indexes); 44 void EnableTaskManager(const base::ListValue* indexes);
42 void DisableTaskManager(const base::ListValue* indexes); 45 void DisableTaskManager(const base::ListValue* indexes);
43 void OpenAboutMemory(const base::ListValue* indexes); 46 void OpenAboutMemory(const base::ListValue* indexes);
44 47
45 private: 48 private:
46 // Models 49 // Models
47 TaskManager* task_manager_; 50 TaskManager* task_manager_;
48 TaskManagerModel* model_; 51 TaskManagerModel* model_;
49 52
50 bool is_enabled_; 53 bool is_enabled_;
51 54
52 // Table to cache the group index of the resource index. 55 // Table to cache the group index of the resource index.
53 std::vector<int> resource_to_group_table_; 56 std::vector<int> resource_to_group_table_;
54 57
55 // Invoked when group(s) are added/changed/removed. 58 // Invoked when group(s) are added/changed/removed.
56 // These method are called from OnItemAdded/-Changed/-Removed internally. 59 // These method are called from OnItemAdded/-Changed/-Removed internally.
57 void OnGroupAdded(int start, int length); 60 void OnGroupAdded(int start, int length);
58 void OnGroupChanged(int start, int length); 61 void OnGroupChanged(int start, int length);
59 void OnGroupRemoved(int start, int length); 62 void OnGroupRemoved(int start, int length);
60 63
61 // Updates |resource_to_group_table_|. 64 // Updates |resource_to_group_table_|.
62 void UpdateResourceGroupTable(int start, int length); 65 void UpdateResourceGroupTable(int start, int length);
63 66
64 DISALLOW_COPY_AND_ASSIGN(TaskManagerHandler); 67 DISALLOW_COPY_AND_ASSIGN(TaskManagerHandler);
65 }; 68 };
66 69
67 #endif // CHROME_BROWSER_UI_WEBUI_TASK_MANAGER_HANDLER_H_ 70 #endif // CHROME_BROWSER_UI_WEBUI_TASK_MANAGER_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698