Chromium Code Reviews

Side by Side Diff: ui/events/platform/x11/device_data_manager_x11.h

Issue 988693005: Chromium roll (https://codereview.chromium.org/976353002) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fixed bad android build patch Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_EVENTS_PLATFORM_X11_DEVICE_DATA_MANAGER_X11_H_ 5 #ifndef UI_EVENTS_PLATFORM_X11_DEVICE_DATA_MANAGER_X11_H_
6 #define UI_EVENTS_PLATFORM_X11_DEVICE_DATA_MANAGER_X11_H_ 6 #define UI_EVENTS_PLATFORM_X11_DEVICE_DATA_MANAGER_X11_H_
7 7
8 // Generically-named #defines from Xlib is conflicting with symbols in GTest. 8 // Generically-named #defines from Xlib is conflicting with symbols in GTest.
9 // So many tests .cc file #undef Bool before including device_data_manager.h, 9 // So many tests .cc file #undef Bool before including device_data_manager.h,
10 // which makes Bool unrecognized in XInput2.h. 10 // which makes Bool unrecognized in XInput2.h.
(...skipping 220 matching lines...)
231 231
232 // Disables and enables events from devices by device id. 232 // Disables and enables events from devices by device id.
233 void DisableDevice(unsigned int deviceid); 233 void DisableDevice(unsigned int deviceid);
234 void EnableDevice(unsigned int deviceid); 234 void EnableDevice(unsigned int deviceid);
235 235
236 // Returns true if |native_event| should be blocked. 236 // Returns true if |native_event| should be blocked.
237 bool IsEventBlocked(const base::NativeEvent& native_event); 237 bool IsEventBlocked(const base::NativeEvent& native_event);
238 238
239 private: 239 private:
240 DeviceDataManagerX11(); 240 DeviceDataManagerX11();
241 virtual ~DeviceDataManagerX11(); 241 ~DeviceDataManagerX11() override;
242 242
243 // Initialize the XInput related system information. 243 // Initialize the XInput related system information.
244 bool InitializeXInputInternal(); 244 bool InitializeXInputInternal();
245 245
246 // Check if an XI event contains data of the specified type. 246 // Check if an XI event contains data of the specified type.
247 bool HasEventData(const XIDeviceEvent* xiev, const DataType type) const; 247 bool HasEventData(const XIDeviceEvent* xiev, const DataType type) const;
248 248
249 void InitializeValuatorsForTest(int deviceid, 249 void InitializeValuatorsForTest(int deviceid,
250 int start_valuator, 250 int start_valuator,
251 int end_valuator, 251 int end_valuator,
(...skipping 51 matching lines...)
303 303
304 unsigned char button_map_[256]; 304 unsigned char button_map_[256];
305 int button_map_count_; 305 int button_map_count_;
306 306
307 DISALLOW_COPY_AND_ASSIGN(DeviceDataManagerX11); 307 DISALLOW_COPY_AND_ASSIGN(DeviceDataManagerX11);
308 }; 308 };
309 309
310 } // namespace ui 310 } // namespace ui
311 311
312 #endif // UI_EVENTS_PLATFORM_X11_DEVICE_DATA_MANAGER_X11_H_ 312 #endif // UI_EVENTS_PLATFORM_X11_DEVICE_DATA_MANAGER_X11_H_
OLDNEW
« no previous file with comments | « ui/events/platform/platform_event_source_unittest.cc ('k') | ui/events/platform/x11/platform_event_utils_x_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine