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

Unified Diff: ui/base/linux/event_factory_evdev.h

Issue 13886018: Add a factory and defines for native Linux surfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Get {base,ui,aura}_unittests working with native linux surface Created 7 years, 8 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
Index: ui/base/linux/event_factory_evdev.h
diff --git a/ui/base/linux/event_factory_evdev.h b/ui/base/linux/event_factory_evdev.h
new file mode 100644
index 0000000000000000000000000000000000000000..a152dbe82c48acdd19aedb65c727131b7fffcce9
--- /dev/null
+++ b/ui/base/linux/event_factory_evdev.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2013 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.
+
+#ifndef UI_BASE_LINUX_EVENT_FACTORY_EVDEV_H_
+#define UI_BASE_LINUX_EVENT_FACTORY_EVDEV_H_
+
+#include "base/memory/scoped_vector.h"
+#include "base/message_pump_libevent.h"
+#include "ui/base/ui_export.h"
+
+namespace ui {
+
+class TouchEventFromEvdevConverter;
+
+// Sets up and manages watcher instances for event sources in /dev/input/*.
+class UI_EXPORT EventFactoryEvdev {
+ public:
+ EventFactoryEvdev();
+ virtual ~EventFactoryEvdev();
+
+ // Opens /dev/input/* event sources as appropriate and set up watchers.
+ void CreateEvdevWatchers();
+ private:
+ // FileDescriptorWatcher instances for each watched source of events.
+ ScopedVector<TouchEventFromEvdevConverter> evdev_watchers_;
+ ScopedVector<base::MessagePumpLibevent::FileDescriptorWatcher>
+ fd_controllers_;
+
+ DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev);
+};
+
+} // namespace ui
+
+#endif // UI_BASE_LINUX_EVENT_FACTORY_EVDEV_H_

Powered by Google App Engine
This is Rietveld 408576698