Drive: Add BatchableRequest subclass.
[chromium-blink-merge.git] / ui / events / ozone / layout / xkb / xkb_evdev_codes.cc
blobd2b7191d3c5907eea3c28c212361d2d44e2e3c7b
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
3 // found in the LICENSE file.
5 #include "ui/events/ozone/layout/xkb/xkb_evdev_codes.h"
7 #include "ui/events/keycodes/dom4/keycode_converter.h"
9 namespace ui {
11 XkbEvdevCodes::XkbEvdevCodes() {
12 invalid_xkb_keycode_ =
13 static_cast<xkb_keycode_t>(KeycodeConverter::InvalidNativeKeycode());
16 XkbEvdevCodes::~XkbEvdevCodes() {
19 xkb_keycode_t XkbEvdevCodes::DomCodeToXkbKeyCode(DomCode dom_code) const {
20 // This assumes KeycodeConverter has been built with evdev/xkb codes.
21 return static_cast<xkb_keycode_t>(
22 KeycodeConverter::DomCodeToNativeKeycode(dom_code));
25 } // namespace ui