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

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

Issue 278403002: Fix ozone build (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« 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 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/touch_event_converter_evdev.h" 5 #include "ui/events/ozone/evdev/touch_event_converter_evdev.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <linux/input.h> 9 #include <linux/input.h>
10 #include <poll.h> 10 #include <poll.h>
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } 257 }
258 } 258 }
259 } 259 }
260 altered_slots_.reset(); 260 altered_slots_.reset();
261 if (is_type_a_) 261 if (is_type_a_)
262 current_slot_ = 0; 262 current_slot_ = 0;
263 break; 263 break;
264 case SYN_MT_REPORT: 264 case SYN_MT_REPORT:
265 // For type A devices, we just get a stream of all current contacts, 265 // For type A devices, we just get a stream of all current contacts,
266 // in some arbitrary order. 266 // in some arbitrary order.
267 current_slot_++; 267 events_[current_slot_++].type_ = ET_TOUCH_PRESSED;
268 is_type_a_ = true; 268 is_type_a_ = true;
269 break; 269 break;
270 case SYN_DROPPED: 270 case SYN_DROPPED:
271 // Some buffer has overrun. We ignore all events up to and 271 // Some buffer has overrun. We ignore all events up to and
272 // including the next SYN_REPORT. 272 // including the next SYN_REPORT.
273 syn_dropped_ = true; 273 syn_dropped_ = true;
274 break; 274 break;
275 default: 275 default:
276 NOTIMPLEMENTED() << "invalid code for EV_SYN: " << input.code; 276 NOTIMPLEMENTED() << "invalid code for EV_SYN: " << input.code;
277 break; 277 break;
278 } 278 }
279 } else if (input.type == EV_KEY) { 279 } else if (input.type == EV_KEY) {
280 switch (input.code) { 280 switch (input.code) {
281 case BTN_TOUCH: 281 case BTN_TOUCH:
282 break; 282 break;
283 default: 283 default:
284 NOTIMPLEMENTED() << "invalid code for EV_KEY: " << input.code; 284 NOTIMPLEMENTED() << "invalid code for EV_KEY: " << input.code;
285 } 285 }
286 } else { 286 } else {
287 NOTIMPLEMENTED() << "invalid type: " << input.type; 287 NOTIMPLEMENTED() << "invalid type: " << input.type;
288 } 288 }
289 } 289 }
290 for (ScopedVector<ui::TouchEvent>::iterator iter = touch_events.begin(); 290 for (ScopedVector<ui::TouchEvent>::iterator iter = touch_events.begin();
291 iter != touch_events.end(); ++iter) { 291 iter != touch_events.end(); ++iter) {
292 DispatchEventToCallback(*iter); 292 DispatchEventToCallback(*iter);
293 } 293 }
294 } 294 }
295 295
296 } // namespace ui 296 } // 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