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"
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
{
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
);
38 scoped_ptr
<base::Thread
> thread_
;
40 DISALLOW_COPY_AND_ASSIGN(EventThreadEvdev
);
45 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_THREAD_EVDEV_H_