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

Unified Diff: views/focus/accelerator_handler_touch.cc

Issue 7942004: Consolidate/cleanup event cracking code; single out GdkEvents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: KeyboardCodeFromNative, Wayland, cleanup and consolidate. Created 9 years, 3 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
Index: views/focus/accelerator_handler_touch.cc
diff --git a/views/focus/accelerator_handler_touch.cc b/views/focus/accelerator_handler_touch.cc
index c76e8badbe38773b3d2fd21bf235ddc388c381af..fa843a34190149606063f7ebd834020e9aa8ba73 100644
--- a/views/focus/accelerator_handler_touch.cc
+++ b/views/focus/accelerator_handler_touch.cc
@@ -8,11 +8,11 @@
#include <gtk/gtk.h>
#include <X11/extensions/XInput2.h>
+#include "ui/base/touchui/touch_factory.h"
#include "views/accelerator.h"
#include "views/events/event.h"
#include "views/focus/focus_manager.h"
#include "views/ime/input_method.h"
-#include "views/touchui/touch_factory.h"
#include "views/view.h"
#include "views/widget/native_widget.h"
@@ -61,9 +61,9 @@ bool DispatchX2Event(Widget* widget, XEvent* xev) {
}
// Is the event coming from a touch device?
- if (TouchFactory::GetInstance()->IsTouchDevice(xievent->sourceid)) {
+ if (ui::TouchFactory::GetInstance()->IsTouchDevice(xievent->sourceid)) {
// Hide the cursor when a touch event comes in.
- TouchFactory::GetInstance()->SetCursorVisible(false, false);
+ ui::TouchFactory::GetInstance()->SetCursorVisible(false, false);
// With XInput 2.0, XI_ButtonPress and XI_ButtonRelease events are
// ignored, as XI_Motion events contain enough data to detect finger
@@ -92,7 +92,7 @@ bool DispatchX2Event(Widget* widget, XEvent* xev) {
(mouseev.IsOnlyLeftMouseButton() ||
mouseev.IsOnlyMiddleMouseButton() ||
mouseev.IsOnlyRightMouseButton());
- TouchFactory::GetInstance()->SetCursorVisible(true, start_timer);
+ ui::TouchFactory::GetInstance()->SetCursorVisible(true, start_timer);
return widget->OnMouseEvent(mouseev);
}
@@ -106,12 +106,12 @@ bool DispatchXEvent(XEvent* xev) {
XID xwindow = xev->xany.window;
if (xev->type == GenericEvent) {
- if (!TouchFactory::GetInstance()->ShouldProcessXI2Event(xev))
+ if (!ui::TouchFactory::GetInstance()->ShouldProcessXI2Event(xev))
return true; // Consume the event.
XGenericEventCookie* cookie = &xev->xcookie;
if (cookie->evtype == XI_HierarchyChanged) {
- TouchFactory::GetInstance()->UpdateDeviceList(cookie->display);
+ ui::TouchFactory::GetInstance()->UpdateDeviceList(cookie->display);
return true;
}
@@ -159,7 +159,7 @@ bool DispatchXEvent(XEvent* xev) {
}
void SetTouchDeviceList(std::vector<unsigned int>& devices) {
- TouchFactory::GetInstance()->SetTouchDeviceList(devices);
+ ui::TouchFactory::GetInstance()->SetTouchDeviceList(devices);
}
AcceleratorHandler::AcceleratorHandler() {}
« ui/base/events.h ('K') | « views/events/event_x.cc ('k') | views/native_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698