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

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

Issue 2019413002: Remove KeyboardDevice class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes for comments. Created 4 years, 6 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
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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 event_factory_evdev_, params)); 78 event_factory_evdev_, params));
79 } 79 }
80 80
81 void DispatchTouchEvent(const TouchEventParams& params) override { 81 void DispatchTouchEvent(const TouchEventParams& params) override {
82 ui_thread_runner_->PostTask( 82 ui_thread_runner_->PostTask(
83 FROM_HERE, base::Bind(&EventFactoryEvdev::DispatchTouchEvent, 83 FROM_HERE, base::Bind(&EventFactoryEvdev::DispatchTouchEvent,
84 event_factory_evdev_, params)); 84 event_factory_evdev_, params));
85 } 85 }
86 86
87 void DispatchKeyboardDevicesUpdated( 87 void DispatchKeyboardDevicesUpdated(
88 const std::vector<KeyboardDevice>& devices) override { 88 const std::vector<InputDevice>& devices) override {
89 ui_thread_runner_->PostTask( 89 ui_thread_runner_->PostTask(
90 FROM_HERE, 90 FROM_HERE,
91 base::Bind(&EventFactoryEvdev::DispatchKeyboardDevicesUpdated, 91 base::Bind(&EventFactoryEvdev::DispatchKeyboardDevicesUpdated,
92 event_factory_evdev_, devices)); 92 event_factory_evdev_, devices));
93 } 93 }
94 void DispatchTouchscreenDevicesUpdated( 94 void DispatchTouchscreenDevicesUpdated(
95 const std::vector<TouchscreenDevice>& devices) override { 95 const std::vector<TouchscreenDevice>& devices) override {
96 ui_thread_runner_->PostTask( 96 ui_thread_runner_->PostTask(
97 FROM_HERE, 97 FROM_HERE,
98 base::Bind(&EventFactoryEvdev::DispatchTouchscreenDevicesUpdated, 98 base::Bind(&EventFactoryEvdev::DispatchTouchscreenDevicesUpdated,
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 } 312 }
313 } 313 }
314 314
315 void EventFactoryEvdev::DispatchUiEvent(Event* event) { 315 void EventFactoryEvdev::DispatchUiEvent(Event* event) {
316 // DispatchEvent takes PlatformEvent which is void*. This function 316 // DispatchEvent takes PlatformEvent which is void*. This function
317 // wraps it with the real type. 317 // wraps it with the real type.
318 DispatchEvent(event); 318 DispatchEvent(event);
319 } 319 }
320 320
321 void EventFactoryEvdev::DispatchKeyboardDevicesUpdated( 321 void EventFactoryEvdev::DispatchKeyboardDevicesUpdated(
322 const std::vector<KeyboardDevice>& devices) { 322 const std::vector<InputDevice>& devices) {
323 TRACE_EVENT0("evdev", "EventFactoryEvdev::DispatchKeyboardDevicesUpdated"); 323 TRACE_EVENT0("evdev", "EventFactoryEvdev::DispatchKeyboardDevicesUpdated");
324 DeviceHotplugEventObserver* observer = DeviceDataManager::GetInstance(); 324 DeviceHotplugEventObserver* observer = DeviceDataManager::GetInstance();
325 observer->OnKeyboardDevicesUpdated(devices); 325 observer->OnKeyboardDevicesUpdated(devices);
326 } 326 }
327 327
328 void EventFactoryEvdev::DispatchTouchscreenDevicesUpdated( 328 void EventFactoryEvdev::DispatchTouchscreenDevicesUpdated(
329 const std::vector<TouchscreenDevice>& devices) { 329 const std::vector<TouchscreenDevice>& devices) {
330 TRACE_EVENT0("evdev", "EventFactoryEvdev::DispatchTouchscreenDevicesUpdated"); 330 TRACE_EVENT0("evdev", "EventFactoryEvdev::DispatchTouchscreenDevicesUpdated");
331 DeviceHotplugEventObserver* observer = DeviceDataManager::GetInstance(); 331 DeviceHotplugEventObserver* observer = DeviceDataManager::GetInstance();
332 observer->OnTouchscreenDevicesUpdated(devices); 332 observer->OnTouchscreenDevicesUpdated(devices);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 425
426 // Scan & monitor devices. 426 // Scan & monitor devices.
427 device_manager_->AddObserver(this); 427 device_manager_->AddObserver(this);
428 device_manager_->ScanDevices(this); 428 device_manager_->ScanDevices(this);
429 429
430 // Notify device thread that initial scan is done. 430 // Notify device thread that initial scan is done.
431 input_device_factory_proxy_->OnStartupScanComplete(); 431 input_device_factory_proxy_->OnStartupScanComplete();
432 } 432 }
433 433
434 } // namespace ui 434 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/event_factory_evdev.h ('k') | ui/events/ozone/evdev/input_device_factory_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698