| 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 "views/accelerator.h" | 5 #include "views/accelerator.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 break; | 36 break; |
| 37 case VK_HOME: | 37 case VK_HOME: |
| 38 string_id = IDS_APP_HOME_KEY; | 38 string_id = IDS_APP_HOME_KEY; |
| 39 break; | 39 break; |
| 40 case VK_INSERT: | 40 case VK_INSERT: |
| 41 string_id = IDS_APP_INSERT_KEY; | 41 string_id = IDS_APP_INSERT_KEY; |
| 42 break; | 42 break; |
| 43 case VK_DELETE: | 43 case VK_DELETE: |
| 44 string_id = IDS_APP_DELETE_KEY; | 44 string_id = IDS_APP_DELETE_KEY; |
| 45 break; | 45 break; |
| 46 case VK_LEFT: |
| 47 string_id = IDS_APP_LEFT_ARROW_KEY; |
| 48 break; |
| 49 case VK_RIGHT: |
| 50 string_id = IDS_APP_RIGHT_ARROW_KEY; |
| 51 break; |
| 52 case VK_BACK: |
| 53 string_id = IDS_APP_BACKSPACE_KEY; |
| 54 break; |
| 46 case VK_F1: | 55 case VK_F1: |
| 47 string_id = IDS_APP_F1_KEY; | 56 string_id = IDS_APP_F1_KEY; |
| 48 break; | 57 break; |
| 49 case VK_F11: | 58 case VK_F11: |
| 50 string_id = IDS_APP_F11_KEY; | 59 string_id = IDS_APP_F11_KEY; |
| 51 break; | 60 break; |
| 52 } | 61 } |
| 53 | 62 |
| 54 std::wstring shortcut; | 63 std::wstring shortcut; |
| 55 if (!string_id) { | 64 if (!string_id) { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 130 |
| 122 // Subtracting the size of the shortcut key and 1 for the '+' sign. | 131 // Subtracting the size of the shortcut key and 1 for the '+' sign. |
| 123 shortcut_rtl.append(shortcut, 0, shortcut.length() - key_length - 1); | 132 shortcut_rtl.append(shortcut, 0, shortcut.length() - key_length - 1); |
| 124 shortcut.swap(shortcut_rtl); | 133 shortcut.swap(shortcut_rtl); |
| 125 } | 134 } |
| 126 | 135 |
| 127 return shortcut; | 136 return shortcut; |
| 128 } | 137 } |
| 129 | 138 |
| 130 } // namespace views | 139 } // namespace views |
| OLD | NEW |