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

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

Issue 790153005: ozone: evdev: Add property to identify internal or external devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_converter_evdev.h" 5 #include "ui/events/ozone/evdev/event_converter_evdev.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "ui/events/devices/input_device.h"
10 11
11 namespace ui { 12 namespace ui {
12 13
13 EventConverterEvdev::EventConverterEvdev(int fd, 14 EventConverterEvdev::EventConverterEvdev(int fd,
14 const base::FilePath& path, 15 const base::FilePath& path,
15 int id) 16 int id,
16 : fd_(fd), path_(path), id_(id) { 17 InputDeviceType type)
18 : fd_(fd), path_(path), id_(id), type_(type) {
17 } 19 }
18 20
19 EventConverterEvdev::~EventConverterEvdev() { 21 EventConverterEvdev::~EventConverterEvdev() {
20 Stop(); 22 Stop();
21 } 23 }
22 24
23 void EventConverterEvdev::Start() { 25 void EventConverterEvdev::Start() {
24 base::MessageLoopForUI::current()->WatchFileDescriptor( 26 base::MessageLoopForUI::current()->WatchFileDescriptor(
25 fd_, true, base::MessagePumpLibevent::WATCH_READ, &controller_, this); 27 fd_, true, base::MessagePumpLibevent::WATCH_READ, &controller_, this);
26 } 28 }
27 29
28 void EventConverterEvdev::Stop() { 30 void EventConverterEvdev::Stop() {
29 controller_.StopWatchingFileDescriptor(); 31 controller_.StopWatchingFileDescriptor();
30 } 32 }
31 33
32 void EventConverterEvdev::OnFileCanWriteWithoutBlocking(int fd) { 34 void EventConverterEvdev::OnFileCanWriteWithoutBlocking(int fd) {
33 NOTREACHED(); 35 NOTREACHED();
34 } 36 }
35 37
36 bool EventConverterEvdev::HasTouchscreen() const { 38 bool EventConverterEvdev::HasTouchscreen() const {
37 return false; 39 return false;
38 } 40 }
39 41
40 gfx::Size EventConverterEvdev::GetTouchscreenSize() const { 42 gfx::Size EventConverterEvdev::GetTouchscreenSize() const {
41 NOTREACHED(); 43 NOTREACHED();
42 return gfx::Size(); 44 return gfx::Size();
43 } 45 }
44 46
45 bool EventConverterEvdev::IsInternal() const {
46 return false;
47 }
48
49 } // namespace ui 47 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/event_converter_evdev.h ('k') | ui/events/ozone/evdev/event_converter_evdev_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698