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

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

Issue 742103002: Ozone keyboard layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lite-code
Patch Set: reeeeebase Created 6 years 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
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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // run it on the FILE thread. 161 // run it on the FILE thread.
162 void CloseInputDevice(const base::FilePath& path, 162 void CloseInputDevice(const base::FilePath& path,
163 scoped_ptr<EventConverterEvdev> converter) { 163 scoped_ptr<EventConverterEvdev> converter) {
164 TRACE_EVENT1("ozone", "CloseInputDevice", "path", path.value()); 164 TRACE_EVENT1("ozone", "CloseInputDevice", "path", path.value());
165 converter.reset(); 165 converter.reset();
166 } 166 }
167 167
168 } // namespace 168 } // namespace
169 169
170 EventFactoryEvdev::EventFactoryEvdev(CursorDelegateEvdev* cursor, 170 EventFactoryEvdev::EventFactoryEvdev(CursorDelegateEvdev* cursor,
171 DeviceManager* device_manager) 171 DeviceManager* device_manager,
172 KeyboardLayoutEngine* keyboard_layout)
172 : last_device_id_(0), 173 : last_device_id_(0),
173 device_manager_(device_manager), 174 device_manager_(device_manager),
174 dispatch_callback_( 175 dispatch_callback_(
175 base::Bind(&EventFactoryEvdev::PostUiEvent, base::Unretained(this))), 176 base::Bind(&EventFactoryEvdev::PostUiEvent, base::Unretained(this))),
176 keyboard_(&modifiers_, dispatch_callback_), 177 keyboard_(&modifiers_, keyboard_layout, dispatch_callback_),
177 cursor_(cursor), 178 cursor_(cursor),
178 #if defined(USE_EVDEV_GESTURES) 179 #if defined(USE_EVDEV_GESTURES)
179 gesture_property_provider_(new GesturePropertyProvider), 180 gesture_property_provider_(new GesturePropertyProvider),
180 #endif 181 #endif
181 input_controller_(this, 182 input_controller_(this,
182 &button_map_ 183 &button_map_
183 #if defined(USE_EVDEV_GESTURES) 184 #if defined(USE_EVDEV_GESTURES)
184 , 185 ,
185 gesture_property_provider_.get() 186 gesture_property_provider_.get()
186 #endif 187 #endif
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 gesture_property_provider_->GetDeviceIdsByType(type, &ids); 365 gesture_property_provider_->GetDeviceIdsByType(type, &ids);
365 #endif 366 #endif
366 // In the future we can add other device matching logics here. 367 // In the future we can add other device matching logics here.
367 368
368 if (device_ids) 369 if (device_ids)
369 device_ids->assign(ids.begin(), ids.end()); 370 device_ids->assign(ids.begin(), ids.end());
370 return !ids.empty(); 371 return !ids.empty();
371 } 372 }
372 373
373 } // namespace ui 374 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/event_factory_evdev.h ('k') | ui/events/ozone/evdev/input_injector_evdev_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698