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..fae71e867fe56256cd1382dcb448982d37b3a976 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/events/touch_transformer.h" |
+#include "ui/gfx/geometry/rect.h" |
#include "ui/gfx/x/x11_atom_cache.h" |
template <typename T> struct DefaultSingletonTraits; |
@@ -217,6 +221,16 @@ class EVENTS_BASE_EXPORT DeviceDataManager { |
DataType type, |
double value); |
+ void ClearTouchTransformerRecord(); |
+ void UpdateTouchInfoForDisplay(int64 display_id, |
+ int touch_device_id, |
+ const TouchTransformer& touch_transformer); |
+ void ApplyTouchTransformer(int touch_device_id, float* x, float* y); |
+ int64 GetDisplayForTouchDevice(int touch_device_id); |
oshima
2014/05/01 09:35:42
const?
Yufeng Shen (Slow to review)
2014/05/01 22:43:48
Done.
|
+ void CalibrateTouchEvent(TouchEvent* event, |
+ int touch_device_id, |
+ const gfx::Rect& bounds); |
+ |
private: |
// Requirement for Singleton. |
friend struct DefaultSingletonTraits<DeviceDataManager>; |
@@ -282,6 +296,14 @@ class EVENTS_BASE_EXPORT DeviceDataManager { |
unsigned char button_map_[256]; |
int button_map_count_; |
+ class TouchEventCalibrate; |
+ scoped_ptr<TouchEventCalibrate> touch_calibrate_; |
+ |
+ // 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. |
+ TouchTransformer touch_device_transformer_map_[kMaxDeviceNum]; |
+ |
DISALLOW_COPY_AND_ASSIGN(DeviceDataManager); |
}; |