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

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

Issue 149503003: Remove common EventConverterOzone class & move to EventConverterEvdev (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/DispatchEventHelper/DispatchEventTask/ Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/key_event_converter.h" 5 #include "ui/events/ozone/evdev/key_event_converter.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <linux/input.h> 8 #include <linux/input.h>
9 9
10 #include "base/message_loop/message_pump_ozone.h" 10 #include "base/message_loop/message_pump_ozone.h"
11 #include "ui/events/event.h" 11 #include "ui/events/event.h"
12 #include "ui/events/keycodes/keyboard_codes.h" 12 #include "ui/events/keycodes/keyboard_codes.h"
13 #include "ui/events/ozone/evdev/event_modifiers.h" 13 #include "ui/events/ozone/evdev/event_modifiers.h"
14 #include "ui/events/ozone/event_factory_ozone.h"
14 15
15 namespace ui { 16 namespace ui {
16 17
17 namespace { 18 namespace {
18 19
19 ui::KeyboardCode KeyboardCodeFromButton(unsigned int code) { 20 ui::KeyboardCode KeyboardCodeFromButton(unsigned int code) {
20 static const ui::KeyboardCode kLinuxBaseKeyMap[] = { 21 static const ui::KeyboardCode kLinuxBaseKeyMap[] = {
21 ui::VKEY_UNKNOWN, // KEY_RESERVED 22 ui::VKEY_UNKNOWN, // KEY_RESERVED
22 ui::VKEY_ESCAPE, // KEY_ESC 23 ui::VKEY_ESCAPE, // KEY_ESC
23 ui::VKEY_1, // KEY_1 24 ui::VKEY_1, // KEY_1
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 } 257 }
257 258
258 int flags = modifiers_->GetModifierFlags(); 259 int flags = modifiers_->GetModifierFlags();
259 260
260 scoped_ptr<KeyEvent> key_event( 261 scoped_ptr<KeyEvent> key_event(
261 new KeyEvent(down ? ET_KEY_PRESSED : ET_KEY_RELEASED, code, flags, true)); 262 new KeyEvent(down ? ET_KEY_PRESSED : ET_KEY_RELEASED, code, flags, true));
262 DispatchEvent(key_event.PassAs<ui::Event>()); 263 DispatchEvent(key_event.PassAs<ui::Event>());
263 } 264 }
264 265
265 } // namespace ui 266 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/key_event_converter.h ('k') | ui/events/ozone/evdev/touch_event_converter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698