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

Unified Diff: ash/wm/gestures/overview_gesture_handler.cc

Issue 2084503007: Moves WindowSelectorController onto WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_overview
Patch Set: fix mash Created 4 years, 6 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
Index: ash/wm/gestures/overview_gesture_handler.cc
diff --git a/ash/wm/gestures/overview_gesture_handler.cc b/ash/wm/gestures/overview_gesture_handler.cc
index bb8d40dcb746fe9b21abbc5a85b10401ec177bad..1ed1484d2fe184f32ba505e639ebc48e275d850d 100644
--- a/ash/wm/gestures/overview_gesture_handler.cc
+++ b/ash/wm/gestures/overview_gesture_handler.cc
@@ -5,8 +5,7 @@
#include "ash/wm/gestures/overview_gesture_handler.h"
#include "ash/common/wm/overview/window_selector_controller.h"
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
+#include "ash/common/wm_shell.h"
#include "ui/events/event.h"
#include "ui/events/event_constants.h"
@@ -43,8 +42,9 @@ bool OverviewGestureHandler::ProcessScrollEvent(const ui::ScrollEvent& event) {
// Only allow swipe up to enter overview, down to exit. Ignore extra swiping
// in the wrong direction.
- Shell* shell = Shell::GetInstance();
- if (shell->window_selector_controller()->IsSelecting()) {
+ WindowSelectorController* window_selector_controller =
+ WmShell::Get()->window_selector_controller();
+ if (window_selector_controller->IsSelecting()) {
if (scroll_y_ < 0)
scroll_x_ = scroll_y_ = 0;
if (scroll_y_ < kSwipeThresholdPixels)
@@ -58,8 +58,8 @@ bool OverviewGestureHandler::ProcessScrollEvent(const ui::ScrollEvent& event) {
// Reset scroll amount on toggling.
scroll_x_ = scroll_y_ = 0;
- shell->metrics()->RecordUserMetricsAction(UMA_TOUCHPAD_GESTURE_OVERVIEW);
- shell->window_selector_controller()->ToggleOverview();
+ WmShell::Get()->RecordUserMetricsAction(UMA_TOUCHPAD_GESTURE_OVERVIEW);
+ window_selector_controller->ToggleOverview();
return true;
}
« no previous file with comments | « ash/system/overview/overview_button_tray_unittest.cc ('k') | ash/wm/gestures/overview_gesture_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698