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

Unified Diff: ui/events/x/device_list_cache_x.h

Issue 52823002: x11: Move XInput2 availability information out of the message pump. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/x/device_data_manager.cc ('k') | ui/events/x/device_list_cache_x.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/x/device_list_cache_x.h
diff --git a/ui/events/x/device_list_cache_x.h b/ui/events/x/device_list_cache_x.h
index 12ce7189c2d2f2e107b5ccd25d6aa134468676dd..5b015d4cea6542e6f063a102c1bb585b748dfcb9 100644
--- a/ui/events/x/device_list_cache_x.h
+++ b/ui/events/x/device_list_cache_x.h
@@ -11,7 +11,7 @@
#include <map>
#include "base/basictypes.h"
-#include "ui/events/events_export.h"
+#include "ui/events/events_base_export.h"
template <typename T> struct DefaultSingletonTraits;
@@ -36,13 +36,20 @@ namespace ui {
// A class to cache the current XInput device list. This minimized the
// round-trip time to the X server whenever such a device list is needed. The
// update function will be called on each incoming XI_HierarchyChanged event.
-class EVENTS_EXPORT DeviceListCacheX {
+class EVENTS_BASE_EXPORT DeviceListCacheX {
public:
static DeviceListCacheX* GetInstance();
void UpdateDeviceList(Display* display);
+ // Returns the list of devices associated with |display|. Uses the old X11
+ // protocol to get the list of the devices.
const XDeviceList& GetXDeviceList(Display* display);
+
+ // Returns the list of devices associated with |display|. Uses the newer
+ // XINPUT2 protocol to get the list of devices. Before making this call, make
+ // sure that XInput2 support is available (e.g. by calling
+ // IsXInput2Available()).
const XIDeviceList& GetXI2DeviceList(Display* display);
private:
@@ -54,8 +61,6 @@ class EVENTS_EXPORT DeviceListCacheX {
std::map<Display*, XDeviceList> x_dev_list_map_;
std::map<Display*, XIDeviceList> xi_dev_list_map_;
- bool xi2_;
-
DISALLOW_COPY_AND_ASSIGN(DeviceListCacheX);
};
« no previous file with comments | « ui/events/x/device_data_manager.cc ('k') | ui/events/x/device_list_cache_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698