OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/base/events/key_identifier_conversion.h" | 5 #include "ui/base/events/key_identifier_conversion.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/hash_tables.h" | 11 #include "base/containers/hash_tables.h" |
12 #include "ui/base/events/event.h" | 12 #include "ui/base/events/event.h" |
13 #include "ui/base/keycodes/keyboard_codes.h" | 13 #include "ui/base/keycodes/keyboard_codes.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 const int kNumIdentifierTypes = 3; | 17 const int kNumIdentifierTypes = 3; |
18 | 18 |
19 typedef struct KeyIdentifier { | 19 typedef struct KeyIdentifier { |
20 // In order: key identifier, character and unicode codepoint. They are | 20 // In order: key identifier, character and unicode codepoint. They are |
21 // searched in that order as well. | 21 // searched in that order as well. |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 | 334 |
335 IdentifierMap::const_iterator iter = map.find(key_identifier); | 335 IdentifierMap::const_iterator iter = map.find(key_identifier); |
336 if (iter != map.end()) | 336 if (iter != map.end()) |
337 return *iter->second; | 337 return *iter->second; |
338 } | 338 } |
339 | 339 |
340 return *kUnknownKeyEvent; | 340 return *kUnknownKeyEvent; |
341 } | 341 } |
342 | 342 |
343 } // namespace ui | 343 } // namespace ui |
OLD | NEW |