OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/views/accelerator.h" | 5 #include "chrome/views/accelerator.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
| 9 #include "app/l10n_util.h" |
9 #include "base/logging.h" | 10 #include "base/logging.h" |
10 #include "base/string_util.h" | 11 #include "base/string_util.h" |
11 #include "chrome/common/l10n_util.h" | |
12 #include "grit/generated_resources.h" | 12 #include "grit/generated_resources.h" |
13 | 13 |
14 namespace views { | 14 namespace views { |
15 | 15 |
16 std::wstring Accelerator::GetShortcutText() const { | 16 std::wstring Accelerator::GetShortcutText() const { |
17 int string_id = 0; | 17 int string_id = 0; |
18 switch(key_code_) { | 18 switch(key_code_) { |
19 case VK_TAB: | 19 case VK_TAB: |
20 string_id = IDS_TAB_KEY; | 20 string_id = IDS_TAB_KEY; |
21 break; | 21 break; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 // Subtracting the size of the shortcut key and 1 for the '+' sign. | 122 // Subtracting the size of the shortcut key and 1 for the '+' sign. |
123 shortcut_rtl.append(shortcut, 0, shortcut.length() - key_length - 1); | 123 shortcut_rtl.append(shortcut, 0, shortcut.length() - key_length - 1); |
124 shortcut.swap(shortcut_rtl); | 124 shortcut.swap(shortcut_rtl); |
125 } | 125 } |
126 | 126 |
127 return shortcut; | 127 return shortcut; |
128 } | 128 } |
129 | 129 |
130 } // namespace views | 130 } // namespace views |
OLD | NEW |