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

Side by Side Diff: ui/events/devices/mojo/input_device_struct_traits.h

Issue 2827803002: Make Interaction Media Features MQ dynamic on Linux. (Closed)
Patch Set: Patch for landing, added the mojo bits 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
« no previous file with comments | « ui/events/devices/input_device.h ('k') | ui/events/devices/mojo/input_devices.mojom » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef UI_EVENTS_DEVICES_MOJO_INPUT_DEVICE_STRUCT_TRAITS_H_ 5 #ifndef UI_EVENTS_DEVICES_MOJO_INPUT_DEVICE_STRUCT_TRAITS_H_
6 #define UI_EVENTS_DEVICES_MOJO_INPUT_DEVICE_STRUCT_TRAITS_H_ 6 #define UI_EVENTS_DEVICES_MOJO_INPUT_DEVICE_STRUCT_TRAITS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ui/events/devices/input_device.h" 10 #include "ui/events/devices/input_device.h"
(...skipping 16 matching lines...) Expand all
27 static int32_t id(const ui::InputDevice& device) { return device.id; } 27 static int32_t id(const ui::InputDevice& device) { return device.id; }
28 28
29 static ui::InputDeviceType type(const ui::InputDevice& device) { 29 static ui::InputDeviceType type(const ui::InputDevice& device) {
30 return device.type; 30 return device.type;
31 } 31 }
32 32
33 static const std::string& name(const ui::InputDevice& device) { 33 static const std::string& name(const ui::InputDevice& device) {
34 return device.name; 34 return device.name;
35 } 35 }
36 36
37 static bool enabled(const ui::InputDevice& device) { return device.enabled; }
38
37 static std::string sys_path(const ui::InputDevice& device) { 39 static std::string sys_path(const ui::InputDevice& device) {
38 return device.sys_path.AsUTF8Unsafe(); 40 return device.sys_path.AsUTF8Unsafe();
39 } 41 }
40 42
41 static uint32_t vendor_id(const ui::InputDevice& device) { 43 static uint32_t vendor_id(const ui::InputDevice& device) {
42 return device.vendor_id; 44 return device.vendor_id;
43 } 45 }
44 46
45 static uint32_t product_id(const ui::InputDevice& device) { 47 static uint32_t product_id(const ui::InputDevice& device) {
46 return device.product_id; 48 return device.product_id;
(...skipping 24 matching lines...) Expand all
71 return device.touch_points; 73 return device.touch_points;
72 } 74 }
73 75
74 static bool Read(ui::mojom::TouchscreenDeviceDataView data, 76 static bool Read(ui::mojom::TouchscreenDeviceDataView data,
75 ui::TouchscreenDevice* out); 77 ui::TouchscreenDevice* out);
76 }; 78 };
77 79
78 } // namespace mojo 80 } // namespace mojo
79 81
80 #endif // UI_EVENTS_DEVICES_MOJO_INPUT_DEVICE_STRUCT_TRAITS_H_ 82 #endif // UI_EVENTS_DEVICES_MOJO_INPUT_DEVICE_STRUCT_TRAITS_H_
OLDNEW
« no previous file with comments | « ui/events/devices/input_device.h ('k') | ui/events/devices/mojo/input_devices.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698