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

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

Issue 280833002: Re-land "Issue 191223007: Move touch CTM from X into Chrome" (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: adding missing file again Created 6 years, 7 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/test/events_test_utils_x11.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/events/x/device_data_manager.h b/ui/events/x/device_data_manager.h
index ce009a0086f94bb7215e233022b73a350165c29d..1135ec222b89ee5d491f5fae7e130aced0c64bc2 100644
--- a/ui/events/x/device_data_manager.h
+++ b/ui/events/x/device_data_manager.h
@@ -20,8 +20,12 @@
#include "base/basictypes.h"
#include "base/event_types.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/events/event.h"
#include "ui/events/event_constants.h"
#include "ui/events/events_base_export.h"
+#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/transform.h"
#include "ui/gfx/x/x11_atom_cache.h"
template <typename T> struct DefaultSingletonTraits;
@@ -217,6 +221,14 @@ class EVENTS_BASE_EXPORT DeviceDataManager {
DataType type,
double value);
+ void ClearTouchTransformerRecord();
+ void UpdateTouchInfoForDisplay(int64 display_id,
+ int touch_device_id,
+ const gfx::Transform& touch_transformer);
+ void ApplyTouchTransformer(int touch_device_id, float* x, float* y);
+ int64 GetDisplayForTouchDevice(int touch_device_id) const;
+ bool TouchEventNeedsCalibrate(int touch_device_id) const;
+
private:
// Requirement for Singleton.
friend struct DefaultSingletonTraits<DeviceDataManager>;
@@ -236,6 +248,8 @@ class EVENTS_BASE_EXPORT DeviceDataManager {
double min_value,
double max_value);
+ bool IsTouchDeviceIdValid(int touch_device_id) const;
+
static const int kMaxDeviceNum = 128;
static const int kMaxXIEventType = XI_LASTEVENT + 1;
static const int kMaxSlotNum = 10;
@@ -282,6 +296,11 @@ class EVENTS_BASE_EXPORT DeviceDataManager {
unsigned char button_map_[256];
int button_map_count_;
+ // Table to keep track of which display id is mapped to which touch device.
+ int64 touch_device_to_display_map_[kMaxDeviceNum];
+ // Index table to find the TouchTransformer for a touch device.
+ gfx::Transform touch_device_transformer_map_[kMaxDeviceNum];
+
DISALLOW_COPY_AND_ASSIGN(DeviceDataManager);
};
« no previous file with comments | « ui/events/test/events_test_utils_x11.cc ('k') | ui/events/x/device_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698