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

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

Issue 972803002: ozone: evdev: Use task_is_slow := false for input device open (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/input_device_factory_evdev.h" 5 #include "ui/events/ozone/evdev/input_device_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/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 OpenInputDeviceReplyCallback reply_callback = 223 OpenInputDeviceReplyCallback reply_callback =
224 base::Bind(&InputDeviceFactoryEvdev::AttachInputDevice, 224 base::Bind(&InputDeviceFactoryEvdev::AttachInputDevice,
225 weak_ptr_factory_.GetWeakPtr()); 225 weak_ptr_factory_.GetWeakPtr());
226 226
227 ++pending_device_changes_; 227 ++pending_device_changes_;
228 228
229 // Dispatch task to open from the worker pool, since open may block. 229 // Dispatch task to open from the worker pool, since open may block.
230 base::WorkerPool::PostTask(FROM_HERE, 230 base::WorkerPool::PostTask(FROM_HERE,
231 base::Bind(&OpenInputDevice, base::Passed(&params), 231 base::Bind(&OpenInputDevice, base::Passed(&params),
232 task_runner_, reply_callback), 232 task_runner_, reply_callback),
233 true /* task_is_slow */); 233 false /* task_is_slow */);
234 } 234 }
235 235
236 void InputDeviceFactoryEvdev::RemoveInputDevice(const base::FilePath& path) { 236 void InputDeviceFactoryEvdev::RemoveInputDevice(const base::FilePath& path) {
237 DetachInputDevice(path); 237 DetachInputDevice(path);
238 } 238 }
239 239
240 void InputDeviceFactoryEvdev::AttachInputDevice( 240 void InputDeviceFactoryEvdev::AttachInputDevice(
241 scoped_ptr<EventConverterEvdev> converter) { 241 scoped_ptr<EventConverterEvdev> converter) {
242 if (converter.get()) { 242 if (converter.get()) {
243 const base::FilePath& path = converter->path(); 243 const base::FilePath& path = converter->path();
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 std::vector<int> ids; 498 std::vector<int> ids;
499 gesture_property_provider_->GetDeviceIdsByType(type, &ids); 499 gesture_property_provider_->GetDeviceIdsByType(type, &ids);
500 for (size_t i = 0; i < ids.size(); ++i) { 500 for (size_t i = 0; i < ids.size(); ++i) {
501 SetGestureBoolProperty(gesture_property_provider_.get(), ids[i], name, 501 SetGestureBoolProperty(gesture_property_provider_.get(), ids[i], name,
502 value); 502 value);
503 } 503 }
504 #endif 504 #endif
505 } 505 }
506 506
507 } // namespace ui 507 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698