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

Unified Diff: ui/events/x/device_data_manager.h

Issue 24482004: events: Make platform specific events code into ui/events/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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
« no previous file with comments | « ui/events/win/events_win.cc ('k') | ui/events/x/device_data_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/x/device_data_manager.h
diff --git a/ui/base/x/device_data_manager.h b/ui/events/x/device_data_manager.h
similarity index 96%
rename from ui/base/x/device_data_manager.h
rename to ui/events/x/device_data_manager.h
index f07012f51e5270c06c869fcf04d83fea69afe744..1d78b1457ed422370680dc065dd84c782e32adfa 100644
--- a/ui/base/x/device_data_manager.h
+++ b/ui/events/x/device_data_manager.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_BASE_X_DEVICE_DATA_MANAGER_H_
-#define UI_BASE_X_DEVICE_DATA_MANAGER_H_
+#ifndef UI_EVENTS_X_DEVICE_DATA_MANAGER_H_
+#define UI_EVENTS_X_DEVICE_DATA_MANAGER_H_
#include <X11/extensions/XInput2.h>
@@ -13,9 +13,9 @@
#include "base/basictypes.h"
#include "base/event_types.h"
-#include "ui/base/ui_export.h"
-#include "ui/base/x/x11_atom_cache.h"
#include "ui/events/event_constants.h"
+#include "ui/events/events_export.h"
+#include "ui/gfx/x/x11_atom_cache.h"
template <typename T> struct DefaultSingletonTraits;
@@ -31,7 +31,7 @@ enum GestureMetricsType {
// A class that extracts and tracks the input events data. It currently handles
// mouse, touchpad and touchscreen devices.
-class UI_EXPORT DeviceDataManager {
+class EVENTS_EXPORT DeviceDataManager {
public:
// Enumerate additional data that one might be interested on an input event,
// which are usually wrapped in X valuators. If you modify any of this,
@@ -193,6 +193,13 @@ class UI_EXPORT DeviceDataManager {
float* data1,
float* data2);
+ // Returns the mapped button.
+ int GetMappedButton(int button);
+
+ // Updates button mapping. This is usually called when a MappingNotify event
+ // is received.
+ void UpdateButtonMap();
+
// Extract the start/end timestamps from CMT events. User must first verify
// the event with HasGestureTimes. Pointers shouldn't be NULL.
void GetGestureTimes(const base::NativeEvent& native_event,
@@ -285,9 +292,12 @@ class UI_EXPORT DeviceDataManager {
// X11 atoms cache.
X11AtomCache atom_cache_;
+ unsigned char button_map_[256];
+ int button_map_count_;
+
DISALLOW_COPY_AND_ASSIGN(DeviceDataManager);
};
} // namespace ui
-#endif // UI_BASE_X_DEVICE_DATA_MANAGER_H_
+#endif // UI_EVENTS_X_DEVICE_DATA_MANAGER_H_
« no previous file with comments | « ui/events/win/events_win.cc ('k') | ui/events/x/device_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698