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

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

Issue 400012: Refactor the keyboard events handling code related to RenderViewHostDelegate:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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/external_tab_container.cc ('k') | chrome/browser/gtk/browser_window_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/browser_window_gtk.h
===================================================================
--- chrome/browser/gtk/browser_window_gtk.h (revision 34219)
+++ chrome/browser/gtk/browser_window_gtk.h (working copy)
@@ -54,9 +54,6 @@
explicit BrowserWindowGtk(Browser* browser);
virtual ~BrowserWindowGtk();
- // Process a keyboard event which was not handled by webkit.
- bool HandleKeyboardEvent(GdkEventKey* event);
-
// Overridden from BrowserWindow
virtual void Show();
virtual void SetBounds(const gfx::Rect& bounds);
@@ -121,7 +118,9 @@
bool show_history);
virtual void ShowPageMenu();
virtual void ShowAppMenu();
- virtual int GetCommandId(const NativeWebKeyboardEvent& event);
+ virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
+ bool* is_keyboard_shortcut);
+ virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event);
virtual void ShowCreateShortcutsDialog(TabContents* tab_contents);
// Overridden from NotificationObserver:
@@ -279,19 +278,26 @@
// border during an expose.
static void DrawContentShadow(cairo_t* cr, BrowserWindowGtk* window);
+ // Callback for accelerator activation. |user_data| stores the command id
+ // of the matched accelerator.
static gboolean OnGtkAccelerator(GtkAccelGroup* accel_group,
GObject* acceleratable,
guint keyval,
GdkModifierType modifier,
- BrowserWindowGtk* browser_window);
+ void* user_data);
+ // Key press event callback.
+ static gboolean OnKeyPress(GtkWidget* widget,
+ GdkEventKey* event,
+ BrowserWindowGtk* window);
+
// Mouse move and mouse button press callbacks.
static gboolean OnMouseMoveEvent(GtkWidget* widget,
GdkEventMotion* event,
- BrowserWindowGtk* browser);
+ BrowserWindowGtk* window);
static gboolean OnButtonPressEvent(GtkWidget* widget,
GdkEventButton* event,
- BrowserWindowGtk* browser);
+ BrowserWindowGtk* window);
// Maps and Unmaps the xid of |widget| to |window|.
static void MainWindowMapped(GtkWidget* widget, BrowserWindowGtk* window);
@@ -300,13 +306,14 @@
// Tracks focus state of browser.
static gboolean OnFocusIn(GtkWidget* widget,
GdkEventFocus* event,
- BrowserWindowGtk* browser);
+ BrowserWindowGtk* window);
static gboolean OnFocusOut(GtkWidget* widget,
GdkEventFocus* event,
- BrowserWindowGtk* browser);
+ BrowserWindowGtk* window);
// A small shim for browser_->ExecuteCommand.
- void ExecuteBrowserCommand(int id);
+ // Returns true if the command was executed.
+ bool ExecuteBrowserCommand(int id);
// Callback for the loading animation(s) associated with this window.
void LoadingAnimationCallback();
« no previous file with comments | « chrome/browser/external_tab_container.cc ('k') | chrome/browser/gtk/browser_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698