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

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

Issue 1136503003: Consolidate ui/events/keycodes/dom[34]/ into .../dom/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/keyboard_util_evdev.h" 5 #include "ui/events/ozone/evdev/keyboard_util_evdev.h"
6 6
7 #include <linux/input.h> 7 #include <linux/input.h>
8 8
9 #include "ui/events/keycodes/dom4/keycode_converter.h" 9 #include "ui/events/keycodes/dom/keycode_converter.h"
10 10
11 namespace ui { 11 namespace ui {
12 12
13 namespace { 13 namespace {
14 14
15 const int kXkbKeycodeOffset = 8; 15 const int kXkbKeycodeOffset = 8;
16 16
17 } // namespace 17 } // namespace
18 18
19 int NativeCodeToEvdevCode(int native_code) { 19 int NativeCodeToEvdevCode(int native_code) {
20 if (native_code == KeycodeConverter::InvalidNativeKeycode()) 20 if (native_code == KeycodeConverter::InvalidNativeKeycode())
21 return KEY_RESERVED; 21 return KEY_RESERVED;
22 22
23 return native_code - kXkbKeycodeOffset; 23 return native_code - kXkbKeycodeOffset;
24 } 24 }
25 25
26 int EvdevCodeToNativeCode(int evdev_code) { 26 int EvdevCodeToNativeCode(int evdev_code) {
27 if (evdev_code == KEY_RESERVED) 27 if (evdev_code == KEY_RESERVED)
28 return KeycodeConverter::InvalidNativeKeycode(); 28 return KeycodeConverter::InvalidNativeKeycode();
29 29
30 return evdev_code + kXkbKeycodeOffset; 30 return evdev_code + kXkbKeycodeOffset;
31 } 31 }
32 32
33 } // namespace ui 33 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/keyboard_evdev.cc ('k') | ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698