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

Side by Side Diff: chrome/test/chromedriver/keycode_text_conversion_mac.mm

Issue 12848005: [chromedriver] Separate stuff of chrome from chromedriver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments and fix compile error on mac. Created 7 years, 9 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 (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/keycode_text_conversion.h" 5 #include "chrome/test/chromedriver/keycode_text_conversion.h"
6 6
7 #import <Carbon/Carbon.h> 7 #import <Carbon/Carbon.h>
8 8
9 #include <cctype> 9 #include <cctype>
10 10
11 #include "base/mac/scoped_cftyperef.h" 11 #include "base/mac/scoped_cftyperef.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "chrome/test/chromedriver/ui_events.h" 13 #include "chrome/test/chromedriver/chrome/ui_events.h"
14 #include "ui/base/keycodes/keyboard_code_conversion_mac.h" 14 #include "ui/base/keycodes/keyboard_code_conversion_mac.h"
15 15
16 std::string ConvertKeyCodeToText(ui::KeyboardCode key_code, int modifiers) { 16 std::string ConvertKeyCodeToText(ui::KeyboardCode key_code, int modifiers) {
17 int mac_key_code = 0; 17 int mac_key_code = 0;
18 { 18 {
19 unichar character, unmodified_character; 19 unichar character, unmodified_character;
20 mac_key_code = ui::MacKeyCodeForWindowsKeyCode( 20 mac_key_code = ui::MacKeyCodeForWindowsKeyCode(
21 key_code, 21 key_code,
22 0, 22 0,
23 &character, 23 &character,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 *necessary_modifiers = kShiftKeyModifierMask; 89 *necessary_modifiers = kShiftKeyModifierMask;
90 found_code = true; 90 found_code = true;
91 } 91 }
92 if (found_code) { 92 if (found_code) {
93 *key_code = code; 93 *key_code = code;
94 break; 94 break;
95 } 95 }
96 } 96 }
97 return found_code; 97 return found_code;
98 } 98 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/key_converter_unittest.cc ('k') | chrome/test/chromedriver/keycode_text_conversion_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698