summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/find_bar_gtk.h
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 17:50:15 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 17:50:15 +0000
commiteca413b0dc3415a19598475d987803e7f45acf1a (patch)
tree2dcdb9ec0f56a6670da0a0810847d680d990040d /chrome/browser/gtk/find_bar_gtk.h
parentc87aa98848fbd1ec35f752e4a14d14a744eae7d3 (diff)
downloadchromium_src-eca413b0dc3415a19598475d987803e7f45acf1a.zip
chromium_src-eca413b0dc3415a19598475d987803e7f45acf1a.tar.gz
chromium_src-eca413b0dc3415a19598475d987803e7f45acf1a.tar.bz2
GTK: Forward certain key strokes from the find bar to the render view.
The choice of keystrokes matches windows. BUG=12697 TEST=press up or down in find bar; page should scroll (assuming it can scroll) Review URL: http://codereview.chromium.org/122014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18176 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/find_bar_gtk.h')
-rw-r--r--chrome/browser/gtk/find_bar_gtk.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/gtk/find_bar_gtk.h b/chrome/browser/gtk/find_bar_gtk.h
index 6fab781..2fcd0bc 100644
--- a/chrome/browser/gtk/find_bar_gtk.h
+++ b/chrome/browser/gtk/find_bar_gtk.h
@@ -64,6 +64,12 @@ class FindBarGtk : public FindBar,
// This should always be called before we claim focus.
void StoreOutsideFocus();
+ // For certain keystrokes, such as up or down, we want to forward the event
+ // to the renderer rather than handling it ourselves. Returns true if the
+ // key event was forwarded.
+ // See similar function in FindBarWin.
+ bool MaybeForwardKeyEventToRenderer(GdkEventKey* event);
+
// Returns the child of |fixed_| that holds what the user perceives as the
// findbar.
GtkWidget* slide_widget();
@@ -75,9 +81,10 @@ class FindBarGtk : public FindBar,
// Callback when the entry text changes.
static gboolean OnChanged(GtkWindow* window, FindBarGtk* find_bar);
- // Callback for key presses.
- static gboolean OnKeyPressEvent(GtkWindow* window, GdkEventKey* event,
+ static gboolean OnKeyPressEvent(GtkWidget* widget, GdkEventKey* event,
FindBarGtk* find_bar);
+ static gboolean OnKeyReleaseEvent(GtkWidget* widget, GdkEventKey* event,
+ FindBarGtk* find_bar);
// Callback for previous, next, and close button.
static void OnClicked(GtkWidget* button, FindBarGtk* find_bar);