Index: ui/events/x/device_data_manager_x11.h |
diff --git a/ui/events/x/device_data_manager_x11.h b/ui/events/x/device_data_manager_x11.h |
index 6ceff06dae59ee846a1e5177943ba22b71c1be48..3384c3ce902228ec302451a03f3d5a23828500cf 100644 |
--- a/ui/events/x/device_data_manager_x11.h |
+++ b/ui/events/x/device_data_manager_x11.h |
@@ -51,53 +51,53 @@ class EVENTS_BASE_EXPORT DeviceDataManagerX11 : public DeviceDataManager { |
enum DataType { |
// Define the valuators used the CrOS CMT driver. Used by mice and CrOS |
// touchpads. |
- DT_CMT_SCROLL_X = 0, // Scroll amount on the X (horizontal) direction. |
- DT_CMT_SCROLL_Y, // Scroll amount on the Y (vertical) direction. |
- DT_CMT_ORDINAL_X, // Original (unaccelerated) value on the X direction. |
- // Can be used both for scrolls and flings. |
- DT_CMT_ORDINAL_Y, // Original (unaccelerated) value on the Y direction. |
- // Can be used both for scrolls and flings. |
- DT_CMT_START_TIME, // Gesture start time. |
- DT_CMT_END_TIME, // Gesture end time. |
- DT_CMT_FLING_X, // Fling amount on the X (horizontal) direction. |
- DT_CMT_FLING_Y, // Fling amount on the Y (vertical) direction. |
- DT_CMT_FLING_STATE, // The state of fling gesture (whether the user just |
- // start flinging or that he/she taps down). |
- DT_CMT_METRICS_TYPE, // Metrics type of the metrics gesture, which are |
- // used to wrap interesting patterns that we would |
- // like to track via the UMA system. |
- DT_CMT_METRICS_DATA1, // Complementary data 1 of the metrics gesture. |
- DT_CMT_METRICS_DATA2, // Complementary data 2 of the metrics gesture. |
- DT_CMT_FINGER_COUNT, // Finger counts in the current gesture. A same type |
- // of gesture can have very different meanings based |
- // on that (e.g. 2f scroll v.s. 3f swipe). |
+ DT_CMT_SCROLL_X = 0, // Scroll amount on the X (horizontal) direction. |
+ DT_CMT_SCROLL_Y, // Scroll amount on the Y (vertical) direction. |
+ DT_CMT_ORDINAL_X, // Original (unaccelerated) value on the X direction. |
+ // Can be used both for scrolls and flings. |
+ DT_CMT_ORDINAL_Y, // Original (unaccelerated) value on the Y direction. |
+ // Can be used both for scrolls and flings. |
+ DT_CMT_START_TIME, // Gesture start time. |
+ DT_CMT_END_TIME, // Gesture end time. |
+ DT_CMT_FLING_X, // Fling amount on the X (horizontal) direction. |
+ DT_CMT_FLING_Y, // Fling amount on the Y (vertical) direction. |
+ DT_CMT_FLING_STATE, // The state of fling gesture (whether the user just |
+ // start flinging or that he/she taps down). |
+ DT_CMT_METRICS_TYPE, // Metrics type of the metrics gesture, which are |
+ // used to wrap interesting patterns that we would |
+ // like to track via the UMA system. |
+ DT_CMT_METRICS_DATA1, // Complementary data 1 of the metrics gesture. |
+ DT_CMT_METRICS_DATA2, // Complementary data 2 of the metrics gesture. |
+ DT_CMT_FINGER_COUNT, // Finger counts in the current gesture. A same type |
+ // of gesture can have very different meanings based |
+ // on that (e.g. 2f scroll v.s. 3f swipe). |
// End of CMT data types. |
// Beginning of touch data types. |
// Define the valuators following the Multi-touch Protocol. Used by |
// touchscreen devices. |
- DT_TOUCH_MAJOR, // Length of the touch area. |
- DT_TOUCH_MINOR, // Width of the touch area. |
- DT_TOUCH_ORIENTATION, // Angle between the X-axis and the major axis of the |
- // touch area. |
- DT_TOUCH_PRESSURE, // Pressure of the touch contact. |
+ DT_TOUCH_MAJOR, // Length of the touch area. |
+ DT_TOUCH_MINOR, // Width of the touch area. |
+ DT_TOUCH_ORIENTATION, // Angle between the X-axis and the major axis of the |
+ // touch area. |
+ DT_TOUCH_PRESSURE, // Pressure of the touch contact. |
- DT_TOUCH_POSITION_X, // Touch X position. |
- DT_TOUCH_POSITION_Y, // Touch Y position. |
+ DT_TOUCH_POSITION_X, // Touch X position. |
+ DT_TOUCH_POSITION_Y, // Touch Y position. |
// NOTE for XInput MT: 'Tracking ID' is provided in every touch event to |
// track individual touch. 'Tracking ID' is an unsigned 32-bit value and |
// is increased for each new touch. It will wrap back to 0 when reaching |
// the numerical limit. |
- DT_TOUCH_TRACKING_ID, // ID of the touch point. |
+ DT_TOUCH_TRACKING_ID, // ID of the touch point. |
// Kernel timestamp from touch screen (if available). |
DT_TOUCH_RAW_TIMESTAMP, |
// End of touch data types. |
- DT_LAST_ENTRY // This must come last. |
+ DT_LAST_ENTRY // This must come last. |
}; |
// Data struct to store extracted data from an input event. |
@@ -238,10 +238,19 @@ class EVENTS_BASE_EXPORT DeviceDataManagerX11 : public DeviceDataManager { |
// Returns true if |native_event| should be blocked. |
bool IsEventBlocked(const base::NativeEvent& native_event); |
+ protected: |
+ // DeviceHotplugEventObserver: |
+ virtual void OnKeyboardDevicesUpdated( |
+ const std::vector<KeyboardDevice>& devices) OVERRIDE; |
+ |
private: |
DeviceDataManagerX11(); |
virtual ~DeviceDataManagerX11(); |
+ // Returns whether the keyboard has been blocked. |
+ static bool ShouldIgnoreKeyboard(const ui::KeyboardDevice keyboard, |
+ DeviceDataManagerX11* manager); |
+ |
// Initialize the XInput related system information. |
bool InitializeXInputInternal(); |