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

Unified Diff: ui/aura/device_list_updater_aurax11.cc

Issue 10895020: Merge aura::DispatcherLinux into base::MessagePumpAuraX11. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes for sadrul Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/device_list_updater_aurax11.h ('k') | ui/aura/dispatcher_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/device_list_updater_aurax11.cc
diff --git a/ui/aura/device_list_updater_aurax11.cc b/ui/aura/device_list_updater_aurax11.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7d0b9471c3ad5d10366ec4992d85c814a78a2499
--- /dev/null
+++ b/ui/aura/device_list_updater_aurax11.cc
@@ -0,0 +1,32 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/aura/device_list_updater_aurax11.h"
+
+#include <X11/extensions/XInput2.h>
+
+#include "ui/base/events.h"
+
+namespace aura {
+
+DeviceListUpdaterAuraX11::DeviceListUpdaterAuraX11() {}
+
+DeviceListUpdaterAuraX11::~DeviceListUpdaterAuraX11() {}
+
+base::EventStatus DeviceListUpdaterAuraX11::WillProcessEvent(
+ const base::NativeEvent& event) {
+ // XI_HierarchyChanged events are special. There is no window associated with
+ // these events. So process them directly from here.
+ if (event->type == GenericEvent &&
+ event->xgeneric.evtype == XI_HierarchyChanged) {
+ ui::UpdateDeviceList();
+ }
+
+ return base::EVENT_CONTINUE;
+}
+
+void DeviceListUpdaterAuraX11::DidProcessEvent(const base::NativeEvent& event) {
+}
+
+} // namespace aura
« no previous file with comments | « ui/aura/device_list_updater_aurax11.h ('k') | ui/aura/dispatcher_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698