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

Unified Diff: views/focus/accelerator_handler_touch.cc

Issue 3704005: Hijack mouse-related events for TOUCH_UI builds (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Refactoring to accomodate both Gtk and X11 easily Created 10 years, 2 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 | « no previous file | views/touchui/touch_event_dispatcher_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/focus/accelerator_handler_touch.cc
diff --git a/views/focus/accelerator_handler_touch.cc b/views/focus/accelerator_handler_touch.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ddcdc04faa483801ffb9bf371fdf1d107fc19038
--- /dev/null
+++ b/views/focus/accelerator_handler_touch.cc
@@ -0,0 +1,32 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <gtk/gtk.h>
+
+#include "views/accelerator.h"
+#include "views/focus/accelerator_handler.h"
+#include "views/focus/focus_manager.h"
+#include "views/touchui/touch_event_dispatcher_gtk.h"
+#include "views/widget/widget_gtk.h"
+
+namespace views {
+
+AcceleratorHandler::AcceleratorHandler() {}
+
+bool AcceleratorHandler::Dispatch(GdkEvent* event) {
+ // The logic for handling keyboard accelerators has been moved into
+ // WidgetGtk::OnKeyEvent handler (views/widget/widget_gtk.cc).
+
+ // TODO(wyck): Hijack TouchUI events at other calls to gtk_main_do_event.
+ // There are more places where we call gtk_main_do_event.
+ // In particular: the message pump itself, and the menu controller,
+ // as well as native_menu_gtk.
+ // This function contains the most important one important one, though.
+ if (!DispatchEventForTouchUIGtk(event))
+ gtk_main_do_event(event);
+
+ return true;
+}
+
+} // namespace views
« no previous file with comments | « no previous file | views/touchui/touch_event_dispatcher_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698