| Index: chrome/browser/gtk/task_manager_gtk.h
|
| ===================================================================
|
| --- chrome/browser/gtk/task_manager_gtk.h (revision 19702)
|
| +++ chrome/browser/gtk/task_manager_gtk.h (working copy)
|
| @@ -5,6 +5,10 @@
|
| #ifndef CHROME_BROWSER_GTK_TASK_MANAGER_GTK_H_
|
| #define CHROME_BROWSER_GTK_TASK_MANAGER_GTK_H_
|
|
|
| +#include <gtk/gtk.h>
|
| +
|
| +#include <string>
|
| +
|
| #include "chrome/browser/task_manager.h"
|
|
|
| class TaskManagerGtk : public TaskManagerModelObserver {
|
| @@ -18,17 +22,35 @@
|
| virtual void OnItemsAdded(int start, int length);
|
| virtual void OnItemsRemoved(int start, int length);
|
|
|
| + // Creates the task manager if it doesn't exist; otherwise, it activates the
|
| + // existing task manager window.
|
| + static void Show();
|
| +
|
| + private:
|
| + // Initializes the task manager dialog.
|
| void Init();
|
|
|
| + // Sets up the treeview widget.
|
| + void CreateTaskManagerTreeview();
|
| +
|
| + // Returns the model data for a given |row| and |col_id|.
|
| + std::string GetModelText(int row, int col_id);
|
| +
|
| + // Sets the treeview row data. |row| is an index into the model and |iter|
|
| + // is the current position in the treeview.
|
| + void SetRowDataFromModel(int row, GtkTreeIter* iter);
|
| +
|
| + // Queries the treeview for the selected rows, and kills those processes.
|
| + void KillSelectedProcesses();
|
| +
|
| // response signal handler that notifies us of dialog responses.
|
| static void OnResponse(GtkDialog* dialog, gint response_id,
|
| TaskManagerGtk* task_manager);
|
|
|
| - // Creates the task manager if it doesn't exist; otherwise, it activates the
|
| - // existing task manager window.
|
| - static void Show();
|
| + // changed signal handler that is sent when the treeview selection changes.
|
| + static void OnSelectionChanged(GtkTreeSelection* selection,
|
| + TaskManagerGtk* task_manager);
|
|
|
| - private:
|
| // The task manager.
|
| TaskManager* task_manager_;
|
|
|
| @@ -41,6 +63,12 @@
|
| // The treeview that contains the process list.
|
| GtkWidget* treeview_;
|
|
|
| + // The list of processes.
|
| + GtkListStore* process_list_;
|
| +
|
| + // The number of processes in |process_list_|.
|
| + int process_count_;
|
| +
|
| // An open task manager window. There can only be one open at a time. This
|
| // is reset to NULL when the window is closed.
|
| static TaskManagerGtk* instance_;
|
|
|