Chromecast: extracts Linux window creation code to a common place.
[chromium-blink-merge.git] / ui / events / x / hotplug_event_handler_x11.h
blobc99fbf2a948f05a34c61673e5b365c2e20c741bf
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_EVENTS_X_HOTPLUG_EVENT_HANDLER_H_
6 #define UI_EVENTS_X_HOTPLUG_EVENT_HANDLER_H_
8 #include "ui/events/x/device_list_cache_x.h"
10 namespace ui {
12 class DeviceHotplugEventObserver;
14 // Parses X11 native devices and propagates the list of active devices to an
15 // observer.
16 class EVENTS_BASE_EXPORT HotplugEventHandlerX11 {
17 public:
18 explicit HotplugEventHandlerX11(DeviceHotplugEventObserver* delegate);
19 ~HotplugEventHandlerX11();
21 // Called on an X11 hotplug event.
22 void OnHotplugEvent();
24 private:
25 void HandleTouchscreenDevices(const XIDeviceList& device_list);
27 DeviceHotplugEventObserver* delegate_; // Not owned.
29 DISALLOW_COPY_AND_ASSIGN(HotplugEventHandlerX11);
32 } // namespace ui
34 #endif // UI_EVENTS_X_HOTPLUG_EVENT_HANDLER_H_