Landing Recent QUIC Changes.
[chromium-blink-merge.git] / ui / events / ozone / evdev / event_thread_evdev.h
blobfa494fc1bffb0a76275a0f68eedbb7161574bde8
1 // Copyright 2015 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_OZONE_EVDEV_EVENT_THREAD_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_EVENT_THREAD_EVDEV_H_
8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h"
11 namespace base {
12 class Thread;
15 namespace ui {
17 class CursorDelegateEvdev;
18 class DeviceEventDispatcherEvdev;
19 class InputDeviceFactoryEvdevProxy;
21 typedef base::Callback<void(scoped_ptr<InputDeviceFactoryEvdevProxy>)>
22 EventThreadStartCallback;
24 // Wrapper for events thread.
25 class EventThreadEvdev {
26 public:
27 EventThreadEvdev();
28 ~EventThreadEvdev();
30 // Start a new events thread. All device events will get sent to the
31 // passed dispatcher. The thread will call directly into cursor, so it
32 // must be synchronized accordingly.
33 void Start(scoped_ptr<DeviceEventDispatcherEvdev> dispatcher,
34 CursorDelegateEvdev* cursor,
35 const EventThreadStartCallback& callback);
37 private:
38 scoped_ptr<base::Thread> thread_;
40 DISALLOW_COPY_AND_ASSIGN(EventThreadEvdev);
43 } // namespace ui
45 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_THREAD_EVDEV_H_