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

Unified Diff: chrome/browser/gtk/task_manager_gtk.h

Issue 151154: Implement the core functionality of the gtk task manager.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/gtk/task_manager_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « no previous file | chrome/browser/gtk/task_manager_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698