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

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

Issue 289283015: Extract touchscreen device management into a generic manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « ui/events/x/device_data_manager_x11.cc ('k') | ui/events/x/events_x.cc » ('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.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) 16 #if defined(USE_AURA)
17 return ui::DeviceDataManager::GetInstance()->IsXInput2Available(); 17 return ui::DeviceDataManagerX11::GetInstance()->IsXInput2Available();
18 #else 18 #else
19 return false; 19 return false;
20 #endif 20 #endif
21 } 21 }
22 22
23 } 23 }
24 24
25 namespace ui { 25 namespace ui {
26 26
27 DeviceListCacheX::DeviceListCacheX() { 27 DeviceListCacheX::DeviceListCacheX() {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 XIDeviceList& xi_dev_list = xi_dev_list_map_[display]; 69 XIDeviceList& xi_dev_list = xi_dev_list_map_[display];
70 if (!xi_dev_list.devices && !xi_dev_list.count) { 70 if (!xi_dev_list.devices && !xi_dev_list.count) {
71 xi_dev_list.devices = XIQueryDevice(display, XIAllDevices, 71 xi_dev_list.devices = XIQueryDevice(display, XIAllDevices,
72 &xi_dev_list.count); 72 &xi_dev_list.count);
73 } 73 }
74 return xi_dev_list; 74 return xi_dev_list;
75 } 75 }
76 76
77 } // namespace ui 77 } // namespace ui
78 78
OLDNEW
« no previous file with comments | « ui/events/x/device_data_manager_x11.cc ('k') | ui/events/x/events_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698