Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: ash/accelerators/accelerator_controller_delegate_aura.cc

Issue 2183993005: Moves handling of toggling applist back to common code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new_window_delegate
Patch Set: merge Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/common/accelerators/accelerator_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller_delegate_aura.cc
diff --git a/ash/accelerators/accelerator_controller_delegate_aura.cc b/ash/accelerators/accelerator_controller_delegate_aura.cc
index d6e5258b255a098e870d662c210fd694330f4437..e90cdab38be3633b86c3d499f60819e2dabc5c06 100644
--- a/ash/accelerators/accelerator_controller_delegate_aura.cc
+++ b/ash/accelerators/accelerator_controller_delegate_aura.cc
@@ -11,7 +11,6 @@
#include "ash/accelerators/accelerator_commands_aura.h"
#include "ash/common/accelerators/debug_commands.h"
-#include "ash/common/accessibility_delegate.h"
#include "ash/common/accessibility_types.h"
#include "ash/common/ash_switches.h"
#include "ash/common/focus_cycler.h"
@@ -279,32 +278,6 @@ void HandleTakeScreenshot(ScreenshotDelegate* screenshot_delegate) {
screenshot_delegate->HandleTakeScreenshotForAllRootWindows();
}
-bool CanHandleToggleAppList(const ui::Accelerator& accelerator,
- const ui::Accelerator& previous_accelerator) {
- if (accelerator.key_code() == ui::VKEY_LWIN) {
- // If something else was pressed between the Search key (LWIN)
- // being pressed and released, then ignore the release of the
- // Search key.
- if (previous_accelerator.type() != ui::ET_KEY_PRESSED ||
- previous_accelerator.key_code() != ui::VKEY_LWIN) {
- return false;
- }
-
- // When spoken feedback is enabled, we should neither toggle the list nor
- // consume the key since Search+Shift is one of the shortcuts the a11y
- // feature uses. crbug.com/132296
- if (WmShell::Get()->accessibility_delegate()->IsSpokenFeedbackEnabled())
- return false;
- }
- return true;
-}
-
-void HandleToggleAppList(const ui::Accelerator& accelerator) {
- if (accelerator.key_code() == ui::VKEY_LWIN)
- base::RecordAction(UserMetricsAction("Accel_Search_LWin"));
- WmShell::Get()->ToggleAppList();
-}
-
gfx::ImageSkia CreateWallpaperImage(SkColor fill, SkColor rect) {
// TODO(oshima): Consider adding a command line option to control
// wallpaper images for testing.
@@ -426,7 +399,6 @@ bool AcceleratorControllerDelegateAura::HandlesAction(
case TAKE_PARTIAL_SCREENSHOT:
case TAKE_SCREENSHOT:
case TAKE_WINDOW_SCREENSHOT:
- case TOGGLE_APP_LIST:
case UNPIN:
return true;
@@ -473,8 +445,6 @@ bool AcceleratorControllerDelegateAura::CanPerformAction(
return accelerators::IsInternalDisplayZoomEnabled();
case SHOW_MESSAGE_CENTER_BUBBLE:
return CanHandleShowMessageCenterBubble();
- case TOGGLE_APP_LIST:
- return CanHandleToggleAppList(accelerator, previous_accelerator);
case UNPIN:
return CanHandleUnpin();
@@ -614,9 +584,6 @@ void AcceleratorControllerDelegateAura::PerformAction(
case TAKE_WINDOW_SCREENSHOT:
HandleTakeWindowScreenshot(screenshot_delegate_.get());
break;
- case TOGGLE_APP_LIST:
- HandleToggleAppList(accelerator);
- break;
case UNPIN:
accelerators::Unpin();
break;
« no previous file with comments | « no previous file | ash/common/accelerators/accelerator_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698