diff options
author | yusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-27 16:58:59 +0000 |
---|---|---|
committer | yusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-27 16:58:59 +0000 |
commit | 2c175873b1b896f2f93e9ec403e4e0abb753df73 (patch) | |
tree | ea6ca9fe5ddf936fe35219a7b4e987a4de3fc12e /ash | |
parent | 1a35cd59a2a6a2f557a103bd1cbd72ba97b159fc (diff) | |
download | chromium_src-2c175873b1b896f2f93e9ec403e4e0abb753df73.zip chromium_src-2c175873b1b896f2f93e9ec403e4e0abb753df73.tar.gz chromium_src-2c175873b1b896f2f93e9ec403e4e0abb753df73.tar.bz2 |
Merge 158524 - Pass F4-10 to an app first if it's launched as window.
This is basically a revert of crrev.com/146523.
BUG=152060,136861
TEST=ash_unittests
TEST=manually confirmed that Ash didn't handle F4-10 keys when a windowed Secure Shell app is focused.
Review URL: https://chromiumcodereview.appspot.com/10986009
TBR=yusukes@chromium.org
Review URL: https://codereview.chromium.org/10996046
git-svn-id: svn://svn.chromium.org/chrome/branches/1271/src@159052 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/accelerators/accelerator_controller.cc | 1 | ||||
-rw-r--r-- | ash/accelerators/accelerator_controller_unittest.cc | 12 | ||||
-rw-r--r-- | ash/accelerators/accelerator_table.cc | 21 | ||||
-rw-r--r-- | ash/accelerators/accelerator_table.h | 3 |
4 files changed, 3 insertions, 34 deletions
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc index 8ace02d..7c43344 100644 --- a/ash/accelerators/accelerator_controller.cc +++ b/ash/accelerators/accelerator_controller.cc @@ -475,7 +475,6 @@ bool AcceleratorController::PerformAction(int action, case RESTORE_TAB: return HandleRestoreTab(); case TAKE_SCREENSHOT: - case TAKE_SCREENSHOT_BY_PRTSCN_KEY: if (screenshot_delegate_.get() && screenshot_delegate_->CanTakeScreenshot()) { screenshot_delegate_->HandleTakeScreenshotForAllRootWindows(); diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc index 8b490b5..601389e 100644 --- a/ash/accelerators/accelerator_controller_unittest.cc +++ b/ash/accelerators/accelerator_controller_unittest.cc @@ -992,17 +992,7 @@ TEST_F(AcceleratorControllerTest, ReservedAccelerators) { ui::Accelerator(ui::VKEY_TAB, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN))); #if defined(OS_CHROMEOS) EXPECT_TRUE(GetController()->IsReservedAccelerator( - ui::Accelerator(ui::VKEY_F5, ui::EF_NONE))); - EXPECT_TRUE(GetController()->IsReservedAccelerator( - ui::Accelerator(ui::VKEY_F6, ui::EF_NONE))); - EXPECT_TRUE(GetController()->IsReservedAccelerator( - ui::Accelerator(ui::VKEY_F7, ui::EF_NONE))); - EXPECT_TRUE(GetController()->IsReservedAccelerator( - ui::Accelerator(ui::VKEY_F8, ui::EF_NONE))); - EXPECT_TRUE(GetController()->IsReservedAccelerator( - ui::Accelerator(ui::VKEY_F9, ui::EF_NONE))); - EXPECT_TRUE(GetController()->IsReservedAccelerator( - ui::Accelerator(ui::VKEY_F10, ui::EF_NONE))); + ui::Accelerator(ui::VKEY_POWER, ui::EF_NONE))); #endif // Others are not reserved. EXPECT_FALSE(GetController()->IsReservedAccelerator( diff --git a/ash/accelerators/accelerator_table.cc b/ash/accelerators/accelerator_table.cc index f4a92fa..c28d294 100644 --- a/ash/accelerators/accelerator_table.cc +++ b/ash/accelerators/accelerator_table.cc @@ -81,7 +81,7 @@ const AcceleratorData kAcceleratorData[] = { { true, ui::VKEY_F5, ui::EF_CONTROL_DOWN, TAKE_SCREENSHOT }, { true, ui::VKEY_F5, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, TAKE_PARTIAL_SCREENSHOT }, - { true, ui::VKEY_PRINT, ui::EF_NONE, TAKE_SCREENSHOT_BY_PRTSCN_KEY }, + { true, ui::VKEY_PRINT, ui::EF_NONE, TAKE_SCREENSHOT }, // On Chrome OS, Search key is mapped to LWIN. { true, ui::VKEY_LWIN, ui::EF_NONE, TOGGLE_APP_LIST }, { true, ui::VKEY_MEDIA_LAUNCH_APP2, ui::EF_NONE, TOGGLE_APP_LIST }, @@ -168,27 +168,8 @@ const AcceleratorAction kReservedActions[] = { CYCLE_FORWARD_MRU, // Alt+Tab #if defined(OS_CHROMEOS) - // Chrome OS top-row keys. - FOCUS_PREVIOUS_PANE, // Control+F1 - FOCUS_NEXT_PANE, // Control+F2 - CYCLE_DISPLAY_MODE, // Control+F4 - TOGGLE_MAXIMIZED, // F4 - CYCLE_FORWARD_LINEAR, // F5 - CYCLE_BACKWARD_LINEAR, // Shift+F5 - TAKE_SCREENSHOT, // Control+F5 - TAKE_PARTIAL_SCREENSHOT, // Shift+Control+F5 - BRIGHTNESS_DOWN, // F6 - KEYBOARD_BRIGHTNESS_DOWN, // Alt+F6 - MAGNIFY_SCREEN_ZOOM_OUT, // Control+F6 - BRIGHTNESS_UP, // F7 - KEYBOARD_BRIGHTNESS_UP, // Alt+F7 - MAGNIFY_SCREEN_ZOOM_IN, // Control+F7 - VOLUME_MUTE, // F8 - VOLUME_DOWN, // F9 - VOLUME_UP, // F10 POWER_PRESSED, POWER_RELEASED, - // TODO(yusukes): Handle F1, F2, F3, and F4 without modifiers in BrowserView. #endif }; diff --git a/ash/accelerators/accelerator_table.h b/ash/accelerators/accelerator_table.h index 85206dd..0003ed5 100644 --- a/ash/accelerators/accelerator_table.h +++ b/ash/accelerators/accelerator_table.h @@ -58,8 +58,7 @@ enum AcceleratorAction { SHOW_TASK_MANAGER, SWITCH_IME, // Switch to another IME depending on the accelerator. TAKE_PARTIAL_SCREENSHOT, - TAKE_SCREENSHOT, // Control+F5 - TAKE_SCREENSHOT_BY_PRTSCN_KEY, // PrtScn + TAKE_SCREENSHOT, TOGGLE_APP_LIST, TOGGLE_CAPS_LOCK, TOGGLE_DESKTOP_BACKGROUND_MODE, |