OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include <gtk/gtk.h> |
| 6 |
| 7 #include "views/accelerator.h" |
| 8 #include "views/focus/accelerator_handler.h" |
| 9 #include "views/focus/focus_manager.h" |
| 10 #include "views/touchui/touch_event_dispatcher_gtk.h" |
| 11 #include "views/widget/widget_gtk.h" |
| 12 |
| 13 namespace views { |
| 14 |
| 15 AcceleratorHandler::AcceleratorHandler() {} |
| 16 |
| 17 bool AcceleratorHandler::Dispatch(GdkEvent* event) { |
| 18 // The logic for handling keyboard accelerators has been moved into |
| 19 // WidgetGtk::OnKeyEvent handler (views/widget/widget_gtk.cc). |
| 20 |
| 21 // TODO(wyck): Hijack TouchUI events at other calls to gtk_main_do_event. |
| 22 // There are more places where we call gtk_main_do_event. |
| 23 // In particular: the message pump itself, and the menu controller, |
| 24 // as well as native_menu_gtk. |
| 25 // This function contains the most important one important one, though. |
| 26 if (!DispatchEventForTouchUIGtk(event)) |
| 27 gtk_main_do_event(event); |
| 28 |
| 29 return true; |
| 30 } |
| 31 |
| 32 } // namespace views |
OLD | NEW |