OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/test/chromedriver/key_converter.h" | 5 #include "chrome/test/chromedriver/key_converter.h" |
6 | 6 |
7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/test/chromedriver/chrome/status.h" |
| 11 #include "chrome/test/chromedriver/chrome/ui_events.h" |
10 #include "chrome/test/chromedriver/keycode_text_conversion.h" | 12 #include "chrome/test/chromedriver/keycode_text_conversion.h" |
11 #include "chrome/test/chromedriver/status.h" | |
12 #include "chrome/test/chromedriver/ui_events.h" | |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 struct ModifierMaskAndKeyCode { | 16 struct ModifierMaskAndKeyCode { |
17 int mask; | 17 int mask; |
18 ui::KeyboardCode key_code; | 18 ui::KeyboardCode key_code; |
19 }; | 19 }; |
20 | 20 |
21 const ModifierMaskAndKeyCode kModifiers[] = { | 21 const ModifierMaskAndKeyCode kModifiers[] = { |
22 { kShiftKeyModifierMask, ui::VKEY_SHIFT }, | 22 { kShiftKeyModifierMask, ui::VKEY_SHIFT }, |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 if (necessary_modifiers[i]) { | 306 if (necessary_modifiers[i]) { |
307 key_events.push_back( | 307 key_events.push_back( |
308 CreateKeyUpEvent(kModifiers[i].key_code, sticky_modifiers)); | 308 CreateKeyUpEvent(kModifiers[i].key_code, sticky_modifiers)); |
309 } | 309 } |
310 } | 310 } |
311 } | 311 } |
312 client_key_events->swap(key_events); | 312 client_key_events->swap(key_events); |
313 *modifiers = sticky_modifiers; | 313 *modifiers = sticky_modifiers; |
314 return Status(kOk); | 314 return Status(kOk); |
315 } | 315 } |
OLD | NEW |