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

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

Issue 160084: Chaos geolocation demo, non-WebKit part. Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 4 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 | « chrome/browser/browser_window.h ('k') | chrome/browser/gtk/api_permissions_panel_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/api_permissions_panel_gtk.h
===================================================================
--- chrome/browser/gtk/api_permissions_panel_gtk.h (revision 0)
+++ chrome/browser/gtk/api_permissions_panel_gtk.h (revision 0)
@@ -0,0 +1,101 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_GTK_API_PERMISSIONS_PANEL_GTK_H_
+#define CHROME_BROWSER_GTK_API_PERMISSIONS_PANEL_GTK_H_
+
+#include <gtk/gtk.h>
+
+#include <string>
+
+#include "base/basictypes.h"
+
+
+class ApiPermissionsPanelGtk {//: public TaskManagerModelObserver {
+ public:
+ ApiPermissionsPanelGtk();
+ virtual ~ApiPermissionsPanelGtk();
+
+ // ApiPermissionsPanelModelObserver
+ /*
+ virtual void OnModelChanged();
+ virtual void OnItemsChanged(int start, int length);
+ 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();
+
+ // Set |dialog_|'s initial size, using its previous size if that was saved.
+ void SetInitialDialogSize();
+
+ // Connects the ctrl-w accelerator to the dialog.
+ void ConnectAccelerators();
+
+ // Sets up the treeview widget.
+ void CreateApiPermissionsPanelTreeview();
+
+ // Returns the model data for a given |row| and |col_id|.
+ std::string GetModelText(int row, int col_id);
+
+ // Retrieves the resource icon from the model for |row|.
+ GdkPixbuf* GetModelIcon(int row);
+
+ // 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);
+
+ void ActivateFocusedTab();
+
+ // response signal handler that notifies us of dialog responses.
+ static void OnResponse(GtkDialog* dialog, gint response_id,
+ ApiPermissionsPanelGtk* task_manager);
+
+ // changed signal handler that is sent when the treeview selection changes.
+ static void OnSelectionChanged(GtkTreeSelection* selection,
+ ApiPermissionsPanelGtk* task_manager);
+
+ // button-press-event handler that activates a process on double-click.
+ static gboolean OnButtonPressEvent(GtkWidget* widget, GdkEventButton* event,
+ ApiPermissionsPanelGtk* task_manager);
+
+ // button-release-event handler that opens the right-click context menu.
+ static gboolean OnButtonReleaseEvent(GtkWidget* widget, GdkEventButton* event,
+ ApiPermissionsPanelGtk* task_manager);
+
+ // Handles an accelerator being pressed.
+ static gboolean OnGtkAccelerator(GtkAccelGroup* accel_group,
+ GObject* acceleratable,
+ guint keyval,
+ GdkModifierType modifier,
+ ApiPermissionsPanelGtk* task_manager);
+
+ static void ClearPermissions(gpointer data, gpointer model);
+
+ // The task manager dialog window.
+ GtkWidget* dialog_;
+
+ // The treeview that contains the process list.
+ GtkWidget* treeview_;
+
+ // The list of sites.
+ GtkListStore* site_list_;
+
+ // The number of sites in |site_list_|.
+ int site_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 ApiPermissionsPanelGtk* instance_;
+
+ DISALLOW_COPY_AND_ASSIGN(ApiPermissionsPanelGtk);
+};
+
+#endif // CHROME_BROWSER_GTK_API_PERMISSIONS_PANEL_GTK_H_
Property changes on: chrome/browser/gtk/api_permissions_panel_gtk.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/browser_window.h ('k') | chrome/browser/gtk/api_permissions_panel_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698