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

Side by Side Diff: ui/events/keycodes/keyboard_code_conversion.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/keycodes/keyboard_code_conversion.h" 5 #include "ui/events/keycodes/keyboard_code_conversion.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/events/event_constants.h" 9 #include "ui/events/event_constants.h"
10 #include "ui/events/keycodes/dom3/dom_code.h" 10 #include "ui/events/keycodes/dom/dom_code.h"
11 #include "ui/events/keycodes/dom3/dom_key.h" 11 #include "ui/events/keycodes/dom/dom_key.h"
12 #include "ui/events/keycodes/dom_us_layout_data.h" 12 #include "ui/events/keycodes/dom_us_layout_data.h"
13 13
14 namespace ui { 14 namespace ui {
15 15
16 namespace { 16 namespace {
17 17
18 // This table maps a subset of |KeyboardCode| (VKEYs) to DomKey and character. 18 // This table maps a subset of |KeyboardCode| (VKEYs) to DomKey and character.
19 // Only values not otherwise handled by GetMeaningFromKeyCode() are here. 19 // Only values not otherwise handled by GetMeaningFromKeyCode() are here.
20 const struct KeyboardCodeToMeaning { 20 const struct KeyboardCodeToMeaning {
21 KeyboardCode key_code; 21 KeyboardCode key_code;
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 return it.dom_code; 536 return it.dom_code;
537 } 537 }
538 for (const auto& it : kFallbackKeyboardCodeToDomCodeMap) { 538 for (const auto& it : kFallbackKeyboardCodeToDomCodeMap) {
539 if (it.key_code == key_code) 539 if (it.key_code == key_code)
540 return it.dom_code; 540 return it.dom_code;
541 } 541 }
542 return DomCode::NONE; 542 return DomCode::NONE;
543 } 543 }
544 544
545 } // namespace ui 545 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/keycodes/dom4/keycode_converter_unittest.cc ('k') | ui/events/keycodes/keyboard_code_conversion_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698