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

Side by Side Diff: chrome/test/chromedriver/keycode_text_conversion_win.cc

Issue 1548153002: Switch to standard integer types in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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) 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 #include <windows.h>
8 #include <stdlib.h>
9 #include <string.h>
7 #include <VersionHelpers.h> 10 #include <VersionHelpers.h>
8 #include <stdlib.h>
9 #include <windows.h>
10 11
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
13 #include "chrome/test/chromedriver/chrome/ui_events.h" 14 #include "chrome/test/chromedriver/chrome/ui_events.h"
14 15
15 bool ConvertKeyCodeToText( 16 bool ConvertKeyCodeToText(
16 ui::KeyboardCode key_code, int modifiers, std::string* text, 17 ui::KeyboardCode key_code, int modifiers, std::string* text,
17 std::string* error_msg) { 18 std::string* error_msg) {
18 UINT scan_code = ::MapVirtualKeyW(key_code, MAPVK_VK_TO_VSC); 19 UINT scan_code = ::MapVirtualKeyW(key_code, MAPVK_VK_TO_VSC);
19 BYTE keyboard_state[256]; 20 BYTE keyboard_state[256];
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 KLF_SETFORPROCESS); 86 KLF_SETFORPROCESS);
86 ::GetKeyboardLayoutName(active_keyboard); 87 ::GetKeyboardLayoutName(active_keyboard);
87 if (wcscmp(active_keyboard, kUsKeyboardLayout) == 0) 88 if (wcscmp(active_keyboard, kUsKeyboardLayout) == 0)
88 return true; 89 return true;
89 } 90 }
90 return false; 91 return false;
91 } else { 92 } else {
92 return ::LoadKeyboardLayout(kUsKeyboardLayout, KLF_ACTIVATE) != NULL; 93 return ::LoadKeyboardLayout(kUsKeyboardLayout, KLF_ACTIVATE) != NULL;
93 } 94 }
94 } 95 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/keycode_text_conversion_unittest.cc ('k') | chrome/test/chromedriver/keycode_text_conversion_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698