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

Unified Diff: chrome/browser/gtk/html_dialog_gtk.cc

Issue 525112: Implement HandleKeyboardEvent() method in HtmlDialog implementations.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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/gtk/html_dialog_gtk.h ('k') | chrome/browser/views/html_dialog_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/html_dialog_gtk.cc
===================================================================
--- chrome/browser/gtk/html_dialog_gtk.cc (revision 35900)
+++ chrome/browser/gtk/html_dialog_gtk.cc (working copy)
@@ -102,6 +102,19 @@
// Ignored.
}
+// A simplified version of BrowserWindowGtk::HandleKeyboardEvent().
+// We don't handle global keyboard shortcuts here, but that's fine since
+// they're all browser-specific. (This may change in the future.)
+void HtmlDialogGtk::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
+ GdkEventKey* os_event = event.os_event;
+ if (!os_event || event.type == WebKit::WebInputEvent::Char)
+ return;
+
+ // To make sure the default key bindings can still work, such as Escape to
+ // close the dialog.
+ gtk_bindings_activate_event(GTK_OBJECT(dialog_), os_event);
+}
+
////////////////////////////////////////////////////////////////////////////////
// HtmlDialogGtk:
« no previous file with comments | « chrome/browser/gtk/html_dialog_gtk.h ('k') | chrome/browser/views/html_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698