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

Side by Side Diff: ui/events/ozone/evdev/event_factory_evdev.cc

Issue 255823009: [WIP] ui/window: Master CL. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_factory_evdev.h" 5 #include "ui/events/ozone/evdev/event_factory_evdev.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <linux/input.h> 8 #include <linux/input.h>
9 9
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 file_task_runner_(base::MessageLoopProxy::current()), 146 file_task_runner_(base::MessageLoopProxy::current()),
147 cursor_(cursor), 147 cursor_(cursor),
148 dispatch_callback_( 148 dispatch_callback_(
149 base::Bind(base::IgnoreResult(&EventFactoryEvdev::DispatchUiEvent), 149 base::Bind(base::IgnoreResult(&EventFactoryEvdev::DispatchUiEvent),
150 base::Unretained(this))), 150 base::Unretained(this))),
151 weak_ptr_factory_(this) {} 151 weak_ptr_factory_(this) {}
152 152
153 EventFactoryEvdev::~EventFactoryEvdev() { STLDeleteValues(&converters_); } 153 EventFactoryEvdev::~EventFactoryEvdev() { STLDeleteValues(&converters_); }
154 154
155 void EventFactoryEvdev::DispatchUiEvent(Event* event) { 155 void EventFactoryEvdev::DispatchUiEvent(Event* event) {
156 EventFactoryOzone::DispatchEvent(event); 156 DispatchEvent(event);
157 } 157 }
158 158
159 void EventFactoryEvdev::AttachInputDevice( 159 void EventFactoryEvdev::AttachInputDevice(
160 const base::FilePath& path, 160 const base::FilePath& path,
161 scoped_ptr<EventConverterEvdev> converter) { 161 scoped_ptr<EventConverterEvdev> converter) {
162 TRACE_EVENT1("ozone", "AttachInputDevice", "path", path.value()); 162 TRACE_EVENT1("ozone", "AttachInputDevice", "path", path.value());
163 CHECK(ui_task_runner_->RunsTasksOnCurrentThread()); 163 CHECK(ui_task_runner_->RunsTasksOnCurrentThread());
164 164
165 // If we have an existing device, detach it. We don't want two 165 // If we have an existing device, detach it. We don't want two
166 // devices with the same name open at the same time. 166 // devices with the same name open at the same time.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 MouseEvent mouse_event(ET_MOUSE_MOVED, 243 MouseEvent mouse_event(ET_MOUSE_MOVED,
244 cursor_->location(), 244 cursor_->location(),
245 cursor_->location(), 245 cursor_->location(),
246 modifiers_.GetModifierFlags(), 246 modifiers_.GetModifierFlags(),
247 /* changed_button_flags */ 0); 247 /* changed_button_flags */ 0);
248 DispatchEvent(&mouse_event); 248 DispatchEvent(&mouse_event);
249 } 249 }
250 } 250 }
251 251
252 } // namespace ui 252 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698