OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "ui/base/events/event_constants.h" | 5 #include "ui/base/events/event_constants.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 #include <X11/extensions/XInput.h> | 8 #include <X11/extensions/XInput.h> |
9 #include <X11/extensions/XInput2.h> | 9 #include <X11/extensions/XInput2.h> |
10 #include <X11/Xlib.h> | 10 #include <X11/Xlib.h> |
11 | 11 |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/memory/singleton.h" | 13 #include "base/memory/singleton.h" |
14 #include "base/message_loop/message_pump_aurax11.h" | 14 #include "base/message_loop/message_pump_x11.h" |
15 #include "ui/base/events/event_utils.h" | 15 #include "ui/base/events/event_utils.h" |
16 #include "ui/base/keycodes/keyboard_code_conversion_x.h" | 16 #include "ui/base/keycodes/keyboard_code_conversion_x.h" |
17 #include "ui/base/touch/touch_factory_x11.h" | 17 #include "ui/base/touch/touch_factory_x11.h" |
18 #include "ui/base/x/device_data_manager.h" | 18 #include "ui/base/x/device_data_manager.h" |
19 #include "ui/base/x/device_list_cache_x.h" | 19 #include "ui/base/x/device_list_cache_x.h" |
20 #include "ui/base/x/x11_atom_cache.h" | 20 #include "ui/base/x/x11_atom_cache.h" |
21 #include "ui/base/x/x11_util.h" | 21 #include "ui/base/x/x11_util.h" |
22 #include "ui/gfx/display.h" | 22 #include "ui/gfx/display.h" |
23 #include "ui/gfx/point.h" | 23 #include "ui/gfx/point.h" |
24 #include "ui/gfx/rect.h" | 24 #include "ui/gfx/rect.h" |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 double GetTouchParamFromXEvent(XEvent* xev, | 254 double GetTouchParamFromXEvent(XEvent* xev, |
255 ui::DeviceDataManager::DataType val, | 255 ui::DeviceDataManager::DataType val, |
256 double default_value) { | 256 double default_value) { |
257 ui::DeviceDataManager::GetInstance()->GetEventData( | 257 ui::DeviceDataManager::GetInstance()->GetEventData( |
258 *xev, val, &default_value); | 258 *xev, val, &default_value); |
259 return default_value; | 259 return default_value; |
260 } | 260 } |
261 | 261 |
262 Atom GetNoopEventAtom() { | 262 Atom GetNoopEventAtom() { |
263 return XInternAtom( | 263 return XInternAtom( |
264 base::MessagePumpAuraX11::GetDefaultXDisplay(), | 264 base::MessagePumpX11::GetDefaultXDisplay(), |
265 "noop", False); | 265 "noop", False); |
266 } | 266 } |
267 | 267 |
268 } // namespace | 268 } // namespace |
269 | 269 |
270 namespace ui { | 270 namespace ui { |
271 | 271 |
272 void UpdateDeviceList() { | 272 void UpdateDeviceList() { |
273 Display* display = GetXDisplay(); | 273 Display* display = GetXDisplay(); |
274 DeviceListCacheX::GetInstance()->UpdateDeviceList(display); | 274 DeviceListCacheX::GetInstance()->UpdateDeviceList(display); |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 noop->xclient.format = 8; | 748 noop->xclient.format = 8; |
749 DCHECK(!noop->xclient.display); | 749 DCHECK(!noop->xclient.display); |
750 } | 750 } |
751 // Make sure we use atom from current xdisplay, which may | 751 // Make sure we use atom from current xdisplay, which may |
752 // change during the test. | 752 // change during the test. |
753 noop->xclient.message_type = GetNoopEventAtom(); | 753 noop->xclient.message_type = GetNoopEventAtom(); |
754 return noop; | 754 return noop; |
755 } | 755 } |
756 | 756 |
757 } // namespace ui | 757 } // namespace ui |
OLD | NEW |