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

Unified Diff: chrome/test/chromedriver/key_converter.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 7 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/chromedriver/key_converter.cc
diff --git a/chrome/test/chromedriver/key_converter.cc b/chrome/test/chromedriver/key_converter.cc
index 6e4070275260a027768011d10753313f79df850c..a384b96cef255350cc90b9a77591583b18d5721a 100644
--- a/chrome/test/chromedriver/key_converter.cc
+++ b/chrome/test/chromedriver/key_converter.cc
@@ -91,11 +91,11 @@ const ui::KeyboardCode kSpecialWebDriverKeys[] = {
ui::VKEY_F11,
ui::VKEY_F12};
-const char16 kWebDriverNullKey = 0xE000U;
-const char16 kWebDriverShiftKey = 0xE008U;
-const char16 kWebDriverControlKey = 0xE009U;
-const char16 kWebDriverAltKey = 0xE00AU;
-const char16 kWebDriverCommandKey = 0xE03DU;
+const base::char16 kWebDriverNullKey = 0xE000U;
+const base::char16 kWebDriverShiftKey = 0xE008U;
+const base::char16 kWebDriverControlKey = 0xE009U;
+const base::char16 kWebDriverAltKey = 0xE00AU;
+const base::char16 kWebDriverCommandKey = 0xE03DU;
// Returns whether the given key code has a corresponding printable char.
// Notice: The given key code should be a special WebDriver key code.
@@ -107,7 +107,7 @@ bool IsSpecialKeyPrintable(ui::KeyboardCode key_code) {
}
// Returns whether the given key is a WebDriver key modifier.
-bool IsModifierKey(char16 key) {
+bool IsModifierKey(base::char16 key) {
switch (key) {
case kWebDriverShiftKey:
case kWebDriverControlKey:
@@ -122,7 +122,8 @@ bool IsModifierKey(char16 key) {
// Gets the key code associated with |key|, if it is a special WebDriver key.
// Returns whether |key| is a special WebDriver key. If true, |key_code| will
// be set.
-bool KeyCodeFromSpecialWebDriverKey(char16 key, ui::KeyboardCode* key_code) {
+bool KeyCodeFromSpecialWebDriverKey(base::char16 key,
+ ui::KeyboardCode* key_code) {
int index = static_cast<int>(key) - 0xE000U;
bool is_special_key = index >= 0 &&
index < static_cast<int>(arraysize(kSpecialWebDriverKeys));
@@ -136,7 +137,7 @@ bool KeyCodeFromSpecialWebDriverKey(char16 key, ui::KeyboardCode* key_code) {
// character, which is shorthand for the return key. Returns whether |key| is
// a shorthand key. If true, |key_code| will be set and |client_should_skip|
// will be set to whether the key should be skipped.
-bool KeyCodeFromShorthandKey(char16 key_utf16,
+bool KeyCodeFromShorthandKey(base::char16 key_utf16,
ui::KeyboardCode* key_code,
bool* client_should_skip) {
base::string16 key_str_utf16;
@@ -200,7 +201,7 @@ Status ConvertKeysToKeyEvents(const base::string16& client_keys,
int sticky_modifiers = *modifiers;
for (size_t i = 0; i < keys.size(); ++i) {
- char16 key = keys[i];
+ base::char16 key = keys[i];
if (key == kWebDriverNullKey) {
// Release all modifier keys and clear |stick_modifiers|.
« no previous file with comments | « chrome/renderer/spellchecker/spellcheck_worditerator.cc ('k') | chrome/test/chromedriver/key_converter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698