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/accelerators/accelerator.h" | 5 #include "ui/base/accelerators/accelerator.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #endif | 9 #endif |
10 | 10 |
11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
15 #include "grit/ui_strings.h" | |
16 #include "ui/base/l10n/l10n_util.h" | 15 #include "ui/base/l10n/l10n_util.h" |
| 16 #include "ui/strings/grit/ui_strings.h" |
17 | 17 |
18 #if !defined(OS_WIN) && (defined(USE_AURA) || defined(OS_MACOSX)) | 18 #if !defined(OS_WIN) && (defined(USE_AURA) || defined(OS_MACOSX)) |
19 #include "ui/events/keycodes/keyboard_code_conversion.h" | 19 #include "ui/events/keycodes/keyboard_code_conversion.h" |
20 #endif | 20 #endif |
21 | 21 |
22 namespace ui { | 22 namespace ui { |
23 | 23 |
24 Accelerator::Accelerator() | 24 Accelerator::Accelerator() |
25 : key_code_(ui::VKEY_UNKNOWN), | 25 : key_code_(ui::VKEY_UNKNOWN), |
26 type_(ui::ET_KEY_PRESSED), | 26 type_(ui::ET_KEY_PRESSED), |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 | 256 |
257 // Subtracting the size of the shortcut key and 1 for the '+' sign. | 257 // Subtracting the size of the shortcut key and 1 for the '+' sign. |
258 shortcut_rtl.append(shortcut, 0, shortcut.length() - key_length - 1); | 258 shortcut_rtl.append(shortcut, 0, shortcut.length() - key_length - 1); |
259 shortcut.swap(shortcut_rtl); | 259 shortcut.swap(shortcut_rtl); |
260 } | 260 } |
261 | 261 |
262 return shortcut; | 262 return shortcut; |
263 } | 263 } |
264 | 264 |
265 } // namespace ui | 265 } // namespace ui |
OLD | NEW |