Chromium Code Reviews| 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..0559dac4ebb21295609c64d638579c97eb8d3d8f |
| --- /dev/null |
| +++ b/ui/aura/device_list_updater_aurax11.cc |
| @@ -0,0 +1,33 @@ |
| +// 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_HANDLED; |
|
sadrul
2012/08/29 16:01:25
I am not sure if returning _HANDLED here is OK. Th
|
| + } |
| + |
| + return base::EVENT_CONTINUE; |
| +} |
| + |
| +void DeviceListUpdaterAuraX11::DidProcessEvent(const base::NativeEvent& event) { |
| +} |
| + |
| +} // namespace aura |