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

Unified Diff: ui/events/ozone/evdev/event_thread_evdev.h

Issue 873833002: [PATCH 11/11] ozone: evdev: Add dedicated events thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 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/events/ozone/evdev/event_factory_evdev.cc ('k') | ui/events/ozone/evdev/event_thread_evdev.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/event_thread_evdev.h
diff --git a/ui/events/ozone/evdev/event_thread_evdev.h b/ui/events/ozone/evdev/event_thread_evdev.h
new file mode 100644
index 0000000000000000000000000000000000000000..fa494fc1bffb0a76275a0f68eedbb7161574bde8
--- /dev/null
+++ b/ui/events/ozone/evdev/event_thread_evdev.h
@@ -0,0 +1,45 @@
+// Copyright 2015 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_EVENTS_OZONE_EVDEV_EVENT_THREAD_EVDEV_H_
+#define UI_EVENTS_OZONE_EVDEV_EVENT_THREAD_EVDEV_H_
+
+#include "base/callback.h"
+#include "base/memory/scoped_ptr.h"
+
+namespace base {
+class Thread;
+}
+
+namespace ui {
+
+class CursorDelegateEvdev;
+class DeviceEventDispatcherEvdev;
+class InputDeviceFactoryEvdevProxy;
+
+typedef base::Callback<void(scoped_ptr<InputDeviceFactoryEvdevProxy>)>
+ EventThreadStartCallback;
+
+// Wrapper for events thread.
+class EventThreadEvdev {
+ public:
+ EventThreadEvdev();
+ ~EventThreadEvdev();
+
+ // Start a new events thread. All device events will get sent to the
+ // passed dispatcher. The thread will call directly into cursor, so it
+ // must be synchronized accordingly.
+ void Start(scoped_ptr<DeviceEventDispatcherEvdev> dispatcher,
+ CursorDelegateEvdev* cursor,
+ const EventThreadStartCallback& callback);
+
+ private:
+ scoped_ptr<base::Thread> thread_;
+
+ DISALLOW_COPY_AND_ASSIGN(EventThreadEvdev);
+};
+
+} // namespace ui
+
+#endif // UI_EVENTS_OZONE_EVDEV_EVENT_THREAD_EVDEV_H_
« no previous file with comments | « ui/events/ozone/evdev/event_factory_evdev.cc ('k') | ui/events/ozone/evdev/event_thread_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698