OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_GTK_TASK_MANAGER_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_TASK_MANAGER_GTK_H_ |
6 #define CHROME_BROWSER_GTK_TASK_MANAGER_GTK_H_ | 6 #define CHROME_BROWSER_GTK_TASK_MANAGER_GTK_H_ |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // Activates the tab associated with the focused row. | 62 // Activates the tab associated with the focused row. |
63 void ActivateFocusedTab(); | 63 void ActivateFocusedTab(); |
64 | 64 |
65 // Opens about:memory in a new foreground tab. | 65 // Opens about:memory in a new foreground tab. |
66 void OnLinkActivated(); | 66 void OnLinkActivated(); |
67 | 67 |
68 // Compare implementation used for sorting columns. | 68 // Compare implementation used for sorting columns. |
69 gint CompareImpl(GtkTreeModel* tree_model, GtkTreeIter* a, | 69 gint CompareImpl(GtkTreeModel* tree_model, GtkTreeIter* a, |
70 GtkTreeIter* b, int id); | 70 GtkTreeIter* b, int id); |
71 | 71 |
| 72 // response signal handler that notifies us of dialog destruction. |
| 73 static void OnDestroy(GtkDialog* dialog, TaskManagerGtk* task_manager); |
| 74 |
72 // response signal handler that notifies us of dialog responses. | 75 // response signal handler that notifies us of dialog responses. |
73 static void OnResponse(GtkDialog* dialog, gint response_id, | 76 static void OnResponse(GtkDialog* dialog, gint response_id, |
74 TaskManagerGtk* task_manager); | 77 TaskManagerGtk* task_manager); |
75 | 78 |
76 // realize signal handler to set the page column's initial size. | 79 // realize signal handler to set the page column's initial size. |
77 static void OnTreeViewRealize(GtkTreeView* treeview, | 80 static void OnTreeViewRealize(GtkTreeView* treeview, |
78 TaskManagerGtk* task_manager); | 81 TaskManagerGtk* task_manager); |
79 | 82 |
80 // changed signal handler that is sent when the treeview selection changes. | 83 // changed signal handler that is sent when the treeview selection changes. |
81 static void OnSelectionChanged(GtkTreeSelection* selection, | 84 static void OnSelectionChanged(GtkTreeSelection* selection, |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 // The treeview that contains the process list. | 189 // The treeview that contains the process list. |
187 GtkWidget* treeview_; | 190 GtkWidget* treeview_; |
188 | 191 |
189 // The list of processes. | 192 // The list of processes. |
190 GtkListStore* process_list_; | 193 GtkListStore* process_list_; |
191 GtkTreeModel* process_list_sort_; | 194 GtkTreeModel* process_list_sort_; |
192 | 195 |
193 // The number of processes in |process_list_|. | 196 // The number of processes in |process_list_|. |
194 int process_count_; | 197 int process_count_; |
195 | 198 |
| 199 // The id of the |dialog_| destroy signal handler. |
| 200 gulong destroy_handler_id_; |
| 201 |
196 // The context menu controller. | 202 // The context menu controller. |
197 scoped_ptr<ContextMenuController> menu_controller_; | 203 scoped_ptr<ContextMenuController> menu_controller_; |
198 | 204 |
199 GtkAccelGroup* accel_group_; | 205 GtkAccelGroup* accel_group_; |
200 | 206 |
201 // An open task manager window. There can only be one open at a time. This | 207 // An open task manager window. There can only be one open at a time. This |
202 // is reset to NULL when the window is closed. | 208 // is reset to NULL when the window is closed. |
203 static TaskManagerGtk* instance_; | 209 static TaskManagerGtk* instance_; |
204 | 210 |
205 DISALLOW_COPY_AND_ASSIGN(TaskManagerGtk); | 211 DISALLOW_COPY_AND_ASSIGN(TaskManagerGtk); |
206 }; | 212 }; |
207 | 213 |
208 #endif // CHROME_BROWSER_GTK_TASK_MANAGER_GTK_H_ | 214 #endif // CHROME_BROWSER_GTK_TASK_MANAGER_GTK_H_ |
OLD | NEW |