| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/keyboard_code_conversion.h" | 5 #include "app/keyboard_code_conversion.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include "base/keyboard_codes.h" | 9 #include "app/keyboard_codes.h" |
| 10 | 10 |
| 11 namespace base { | 11 namespace app { |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 typedef struct KeyIdentifier { | 15 typedef struct KeyIdentifier { |
| 16 const char* key_name; | 16 const char* key_name; |
| 17 const char character; | 17 const char character; |
| 18 const char* unicode_codepoint; | 18 const char* unicode_codepoint; |
| 19 const KeyboardCode key_code; | 19 const KeyboardCode key_code; |
| 20 } KeyIdentifier; | 20 } KeyIdentifier; |
| 21 | 21 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 | 286 |
| 287 | 287 |
| 288 KeyboardCode KeyCodeFromKeyIdentifier(const std::string& key_identifier) { | 288 KeyboardCode KeyCodeFromKeyIdentifier(const std::string& key_identifier) { |
| 289 const KeyIdentifier* id = GetKeyIdentifierData(key_identifier); | 289 const KeyIdentifier* id = GetKeyIdentifierData(key_identifier); |
| 290 if (!id) { | 290 if (!id) { |
| 291 return VKEY_UNKNOWN; | 291 return VKEY_UNKNOWN; |
| 292 } | 292 } |
| 293 return id->key_code; | 293 return id->key_code; |
| 294 } | 294 } |
| 295 | 295 |
| 296 } // namespace base | 296 } // namespace app |
| OLD | NEW |