summaryrefslogtreecommitdiffstats
path: root/views/focus
diff options
context:
space:
mode:
authoravayvod@chromium.org <avayvod@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-16 12:34:20 +0000
committeravayvod@chromium.org <avayvod@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-16 12:34:20 +0000
commitab561612e608909b339ba9f3edbde0629634899c (patch)
treec4974c404cc36d5f978923b1439a9c8d7754bb8e /views/focus
parent35274d7b93678c501029ef47d4e07330cac90012 (diff)
downloadchromium_src-ab561612e608909b339ba9f3edbde0629634899c.zip
chromium_src-ab561612e608909b339ba9f3edbde0629634899c.tar.gz
chromium_src-ab561612e608909b339ba9f3edbde0629634899c.tar.bz2
Allow widgets to have keyboard shortcuts.
BUG=cros:3956 TEST=Check that keyboard shortcuts work on login screens. Review URL: http://codereview.chromium.org/2857004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49929 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/focus')
-rw-r--r--views/focus/accelerator_handler_gtk.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/views/focus/accelerator_handler_gtk.cc b/views/focus/accelerator_handler_gtk.cc
index e69553f..fb04e89 100644
--- a/views/focus/accelerator_handler_gtk.cc
+++ b/views/focus/accelerator_handler_gtk.cc
@@ -9,7 +9,7 @@
#include "views/accelerator.h"
#include "views/focus/accelerator_handler.h"
#include "views/focus/focus_manager.h"
-#include "views/window/window_gtk.h"
+#include "views/widget/widget_gtk.h"
namespace views {
@@ -55,10 +55,12 @@ bool AcceleratorHandler::Dispatch(GdkEvent* event) {
gtk_main_do_event(event);
return true;
}
- DCHECK(ptr); // The top-level window is expected to always be associated
- // with the top-level gtk widget.
- WindowGtk* widget =
- WindowGtk::GetWindowForNative(reinterpret_cast<GtkWidget*>(ptr));
+ DCHECK(ptr);
+
+ // The top-level window or window widget is expected to always be associated
+ // with the top-level gtk widget.
+ WidgetGtk* widget =
+ WidgetGtk::GetViewForNative(reinterpret_cast<GtkWidget*>(ptr));
if (!widget) {
// During dnd we get events for windows we don't control (such as the
// window being dragged).