OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 "base/logging.h" | 5 #include "base/logging.h" |
6 #include "base/strings/string16.h" | 6 #include "base/strings/string16.h" |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/test/chromedriver/chrome/ui_events.h" | 9 #include "chrome/test/chromedriver/chrome/ui_events.h" |
10 #include "chrome/test/chromedriver/keycode_text_conversion.h" | 10 #include "chrome/test/chromedriver/keycode_text_conversion.h" |
11 #include "ui/events/event_constants.h" | 11 #include "ui/events/event_constants.h" |
12 #include "ui/events/keycodes/dom3/dom_code.h" | 12 #include "ui/events/keycodes/dom/dom_code.h" |
13 #include "ui/events/keycodes/keyboard_code_conversion.h" | 13 #include "ui/events/keycodes/keyboard_code_conversion.h" |
14 #include "ui/events/ozone/layout/keyboard_layout_engine.h" | 14 #include "ui/events/ozone/layout/keyboard_layout_engine.h" |
15 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" | 15 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" |
16 | 16 |
17 bool ConvertKeyCodeToText(ui::KeyboardCode key_code, | 17 bool ConvertKeyCodeToText(ui::KeyboardCode key_code, |
18 int modifiers, | 18 int modifiers, |
19 std::string* text, | 19 std::string* text, |
20 std::string* error_msg) { | 20 std::string* error_msg) { |
21 ui::KeyboardLayoutEngine* keyboard_layout_engine = | 21 ui::KeyboardLayoutEngine* keyboard_layout_engine = |
22 ui::KeyboardLayoutEngineManager::GetKeyboardLayoutEngine(); | 22 ui::KeyboardLayoutEngineManager::GetKeyboardLayoutEngine(); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 *necessary_modifiers = kShiftKeyModifierMask; | 85 *necessary_modifiers = kShiftKeyModifierMask; |
86 found_code = true; | 86 found_code = true; |
87 } | 87 } |
88 if (found_code) { | 88 if (found_code) { |
89 *key_code = code; | 89 *key_code = code; |
90 break; | 90 break; |
91 } | 91 } |
92 } | 92 } |
93 return found_code; | 93 return found_code; |
94 } | 94 } |
OLD | NEW |