| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/events/ozone/evdev/event_thread_evdev.h" | 5 #include "ui/events/ozone/evdev/event_thread_evdev.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/debug/trace_event.h" | |
| 10 #include "base/logging.h" | 9 #include "base/logging.h" |
| 11 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| 12 #include "base/threading/thread.h" | 11 #include "base/threading/thread.h" |
| 12 #include "base/trace_event/trace_event.h" |
| 13 #include "ui/events/ozone/evdev/device_event_dispatcher_evdev.h" | 13 #include "ui/events/ozone/evdev/device_event_dispatcher_evdev.h" |
| 14 #include "ui/events/ozone/evdev/input_device_factory_evdev.h" | 14 #include "ui/events/ozone/evdev/input_device_factory_evdev.h" |
| 15 #include "ui/events/ozone/evdev/input_device_factory_evdev_proxy.h" | 15 #include "ui/events/ozone/evdev/input_device_factory_evdev_proxy.h" |
| 16 | 16 |
| 17 namespace ui { | 17 namespace ui { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // Internal base::Thread subclass for events thread. | 21 // Internal base::Thread subclass for events thread. |
| 22 class EvdevThread : public base::Thread { | 22 class EvdevThread : public base::Thread { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 CursorDelegateEvdev* cursor, | 73 CursorDelegateEvdev* cursor, |
| 74 const EventThreadStartCallback& callback) { | 74 const EventThreadStartCallback& callback) { |
| 75 TRACE_EVENT0("ozone", "EventThreadEvdev::Start"); | 75 TRACE_EVENT0("ozone", "EventThreadEvdev::Start"); |
| 76 thread_.reset(new EvdevThread(dispatcher.Pass(), cursor, callback)); | 76 thread_.reset(new EvdevThread(dispatcher.Pass(), cursor, callback)); |
| 77 if (!thread_->StartWithOptions( | 77 if (!thread_->StartWithOptions( |
| 78 base::Thread::Options(base::MessageLoop::TYPE_UI, 0))) | 78 base::Thread::Options(base::MessageLoop::TYPE_UI, 0))) |
| 79 LOG(FATAL) << "Failed to create input thread"; | 79 LOG(FATAL) << "Failed to create input thread"; |
| 80 } | 80 } |
| 81 | 81 |
| 82 } // namespace ui | 82 } // namespace ui |
| OLD | NEW |