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

Side by Side Diff: ui/events/x/device_list_cache_x.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « ui/events/ozone/events_ozone_export.h ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/events/x/device_list_cache_x.h" 5 #include "ui/events/x/device_list_cache_x.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "ui/events/x/device_data_manager_x11.h" 11 #include "ui/events/x/device_data_manager_x11.h"
12 12
13 namespace { 13 namespace {
14 14
15 bool IsXI2Available() { 15 bool IsXI2Available() {
16 #if defined(USE_AURA)
17 return ui::DeviceDataManagerX11::GetInstance()->IsXInput2Available();
18 #else
19 return false; 16 return false;
20 #endif
21 } 17 }
22 18
23 } 19 }
24 20
25 namespace ui { 21 namespace ui {
26 22
27 DeviceListCacheX::DeviceListCacheX() { 23 DeviceListCacheX::DeviceListCacheX() {
28 } 24 }
29 25
30 DeviceListCacheX::~DeviceListCacheX() { 26 DeviceListCacheX::~DeviceListCacheX() {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 XIDeviceList& xi_dev_list = xi_dev_list_map_[display]; 65 XIDeviceList& xi_dev_list = xi_dev_list_map_[display];
70 if (!xi_dev_list.devices && !xi_dev_list.count) { 66 if (!xi_dev_list.devices && !xi_dev_list.count) {
71 xi_dev_list.devices = XIQueryDevice(display, XIAllDevices, 67 xi_dev_list.devices = XIQueryDevice(display, XIAllDevices,
72 &xi_dev_list.count); 68 &xi_dev_list.count);
73 } 69 }
74 return xi_dev_list; 70 return xi_dev_list;
75 } 71 }
76 72
77 } // namespace ui 73 } // namespace ui
78 74
OLDNEW
« no previous file with comments | « ui/events/ozone/events_ozone_export.h ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698