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

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

Issue 113403006: Update some uses of char16 to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | 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 #include <algorithm> 7 #include <algorithm>
8 #include <X11/keysym.h> 8 #include <X11/keysym.h>
9 #include <X11/XKBlib.h> 9 #include <X11/XKBlib.h>
10 #include <X11/Xlib.h> 10 #include <X11/Xlib.h>
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 uint16 character = ui::GetCharacterFromXEvent(&event); 222 uint16 character = ui::GetCharacterFromXEvent(&event);
223 223
224 if (!character) 224 if (!character)
225 *text = std::string(); 225 *text = std::string();
226 else 226 else
227 *text = base::UTF16ToUTF8(base::string16(1, character)); 227 *text = base::UTF16ToUTF8(base::string16(1, character));
228 return true; 228 return true;
229 } 229 }
230 230
231 bool ConvertCharToKeyCode( 231 bool ConvertCharToKeyCode(
232 char16 key, 232 base::char16 key,
233 ui::KeyboardCode* key_code, 233 ui::KeyboardCode* key_code,
234 int* necessary_modifiers, 234 int* necessary_modifiers,
235 std::string* error_msg) { 235 std::string* error_msg) {
236 std::string key_string(base::UTF16ToUTF8(base::string16(1, key))); 236 std::string key_string(base::UTF16ToUTF8(base::string16(1, key)));
237 bool found = false; 237 bool found = false;
238 ui::KeyboardCode test_code; 238 ui::KeyboardCode test_code;
239 int test_modifiers; 239 int test_modifiers;
240 *error_msg = std::string(); 240 *error_msg = std::string();
241 std::string conv_string; 241 std::string conv_string;
242 for (size_t i = 0; i < arraysize(kKeyCodeToXKeyCode); ++i) { 242 for (size_t i = 0; i < arraysize(kKeyCodeToXKeyCode); ++i) {
(...skipping 17 matching lines...) Expand all
260 found = true; 260 found = true;
261 break; 261 break;
262 } 262 }
263 } 263 }
264 if (found) { 264 if (found) {
265 *key_code = test_code; 265 *key_code = test_code;
266 *necessary_modifiers = test_modifiers; 266 *necessary_modifiers = test_modifiers;
267 } 267 }
268 return found; 268 return found;
269 } 269 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/keycode_text_conversion_win.cc ('k') | chrome/utility/importer/ie_importer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698