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

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

Issue 2827803002: Make Interaction Media Features MQ dynamic on Linux. (Closed)
Patch Set: Rebase and fix test failures Created 3 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
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 <errno.h> 5 #include <errno.h>
6 #include <linux/input.h> 6 #include <linux/input.h>
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "ui/events/ozone/evdev/event_converter_evdev.h" 9 #include "ui/events/ozone/evdev/event_converter_evdev.h"
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 return; 55 return;
56 if (enabled) { 56 if (enabled) {
57 TRACE_EVENT1("evdev", "EventConverterEvdev::OnEnabled", "path", 57 TRACE_EVENT1("evdev", "EventConverterEvdev::OnEnabled", "path",
58 path_.value()); 58 path_.value());
59 OnEnabled(); 59 OnEnabled();
60 } else { 60 } else {
61 TRACE_EVENT1("evdev", "EventConverterEvdev::OnDisabled", "path", 61 TRACE_EVENT1("evdev", "EventConverterEvdev::OnDisabled", "path",
62 path_.value()); 62 path_.value());
63 OnDisabled(); 63 OnDisabled();
64 } 64 }
65 enabled_ = enabled; 65 enabled_ = input_device_.enabled = enabled;
sadrul 2017/05/10 01:47:54 Can we get rid of |enabled_|?
66 } 66 }
67 67
68 void EventConverterEvdev::OnStopped() { 68 void EventConverterEvdev::OnStopped() {
69 } 69 }
70 70
71 void EventConverterEvdev::OnEnabled() { 71 void EventConverterEvdev::OnEnabled() {
72 } 72 }
73 73
74 void EventConverterEvdev::OnDisabled() { 74 void EventConverterEvdev::OnDisabled() {
75 } 75 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 base::TimeTicks EventConverterEvdev::TimeTicksFromInputEvent( 160 base::TimeTicks EventConverterEvdev::TimeTicksFromInputEvent(
161 const input_event& event) { 161 const input_event& event) {
162 base::TimeTicks timestamp = 162 base::TimeTicks timestamp =
163 ui::EventTimeStampFromSeconds(event.time.tv_sec) + 163 ui::EventTimeStampFromSeconds(event.time.tv_sec) +
164 base::TimeDelta::FromMicroseconds(event.time.tv_usec); 164 base::TimeDelta::FromMicroseconds(event.time.tv_usec);
165 ValidateEventTimeClock(&timestamp); 165 ValidateEventTimeClock(&timestamp);
166 return timestamp; 166 return timestamp;
167 } 167 }
168 } // namespace ui 168 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698