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

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

Issue 155027: Add a context menu to 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 19850)
+++ chrome/browser/gtk/task_manager_gtk.h (working copy)
@@ -27,6 +27,9 @@
static void Show();
private:
+ class ContextMenuController;
+ friend class ContextMenuController;
+
// Initializes the task manager dialog.
void Init();
@@ -46,6 +49,9 @@
// Queries the treeview for the selected rows, and kills those processes.
void KillSelectedProcesses();
+ // Opens the context menu used to select the task manager columns.
+ void ShowContextMenu();
+
// response signal handler that notifies us of dialog responses.
static void OnResponse(GtkDialog* dialog, gint response_id,
TaskManagerGtk* task_manager);
@@ -54,6 +60,10 @@
static void OnSelectionChanged(GtkTreeSelection* selection,
TaskManagerGtk* task_manager);
+ // button-release-event handler that opens the right-click context menu.
+ static gboolean OnButtonReleaseEvent(GtkWidget* widget, GdkEventButton* event,
+ TaskManagerGtk* task_manager);
+
// The task manager.
TaskManager* task_manager_;
@@ -72,6 +82,9 @@
// The number of processes in |process_list_|.
int process_count_;
+ // The context menu controller.
+ scoped_ptr<ContextMenuController> menu_controller_;
+
// 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