| 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 "ash/common/accelerators/accelerator_table.h" | 5 #include "ash/common/accelerators/accelerator_table.h" |
| 6 | 6 |
| 7 #include "ash/common/strings/grit/ash_strings.h" | 7 #include "ash/common/strings/grit/ash_strings.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 | 9 |
| 10 namespace ash { | 10 namespace ash { |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 // 2- Add an entry for it in the following |kDeprecatedAccelerators| list. | 177 // 2- Add an entry for it in the following |kDeprecatedAccelerators| list. |
| 178 // 3- Add another entry in the |kDeprecatedAcceleratorsData|. | 178 // 3- Add another entry in the |kDeprecatedAcceleratorsData|. |
| 179 // 4- That entry should contain the following: | 179 // 4- That entry should contain the following: |
| 180 // - The action that the deprecated accelerator maps to. | 180 // - The action that the deprecated accelerator maps to. |
| 181 // - Define a histogram for this action in |histograms.xml| in the form | 181 // - Define a histogram for this action in |histograms.xml| in the form |
| 182 // "Ash.Accelerators.Deprecated.{ActionName}" and include the name of this | 182 // "Ash.Accelerators.Deprecated.{ActionName}" and include the name of this |
| 183 // histogram in this entry. This name will be used as the ID of the | 183 // histogram in this entry. This name will be used as the ID of the |
| 184 // notification to be shown to the user. This is to prevent duplication of | 184 // notification to be shown to the user. This is to prevent duplication of |
| 185 // same notification. | 185 // same notification. |
| 186 // - The ID of the localized notification message to give the users telling | 186 // - The ID of the localized notification message to give the users telling |
| 187 // them about the deprecation (Add one in |ash_chromeos_strings.grdp|. | 187 // them about the deprecation (Add one in |ash_strings.grd|. Search for |
| 188 // Search for the comment <!-- Deprecated Accelerators Messages -->). | 188 // the comment <!-- Deprecated Accelerators Messages -->). |
| 189 // - The IDs of the localized old and new shortcut text to be used to fill | 189 // - The IDs of the localized old and new shortcut text to be used to fill |
| 190 // the notification text. Also found in |ash_chromeos_strings.grdp|. | 190 // the notification text. Also found in |ash_strings.grd|. |
| 191 // - {true or false} whether the deprecated accelerator is still enabled (we | 191 // - {true or false} whether the deprecated accelerator is still enabled (we |
| 192 // don't disable a deprecated accelerator abruptly). | 192 // don't disable a deprecated accelerator abruptly). |
| 193 // 5- Don't forget to update the keyboard overlay. Find 'shortcut' in the file | 193 // 5- Don't forget to update the keyboard overlay. Find 'shortcut' in the file |
| 194 // keyboard_overlay_data.js. | 194 // keyboard_overlay_data.js. |
| 195 const AcceleratorData kDeprecatedAccelerators[] = { | 195 const AcceleratorData kDeprecatedAccelerators[] = { |
| 196 {true, ui::VKEY_L, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, LOCK_SCREEN}, | 196 {true, ui::VKEY_L, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, LOCK_SCREEN}, |
| 197 {true, ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN, SHOW_TASK_MANAGER}}; | 197 {true, ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN, SHOW_TASK_MANAGER}}; |
| 198 | 198 |
| 199 const size_t kDeprecatedAcceleratorsLength = arraysize(kDeprecatedAccelerators); | 199 const size_t kDeprecatedAcceleratorsLength = arraysize(kDeprecatedAccelerators); |
| 200 | 200 |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 TOGGLE_SPOKEN_FEEDBACK, | 494 TOGGLE_SPOKEN_FEEDBACK, |
| 495 TOGGLE_WIFI, | 495 TOGGLE_WIFI, |
| 496 VOLUME_DOWN, | 496 VOLUME_DOWN, |
| 497 VOLUME_MUTE, | 497 VOLUME_MUTE, |
| 498 VOLUME_UP, | 498 VOLUME_UP, |
| 499 }; | 499 }; |
| 500 | 500 |
| 501 const size_t kActionsKeepingMenuOpenLength = arraysize(kActionsKeepingMenuOpen); | 501 const size_t kActionsKeepingMenuOpenLength = arraysize(kActionsKeepingMenuOpen); |
| 502 | 502 |
| 503 } // namespace ash | 503 } // namespace ash |
| OLD | NEW |