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

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

Issue 2224653002: mash: Remove ash::ShelfGestureHandler and ui::ET_GESTURE_WIN8_EDGE_SWIPE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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 | « ash/wm/gestures/shelf_gesture_handler.h ('k') | ash/wm/immersive_fullscreen_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/gestures/shelf_gesture_handler.cc
diff --git a/ash/wm/gestures/shelf_gesture_handler.cc b/ash/wm/gestures/shelf_gesture_handler.cc
deleted file mode 100644
index 1996ad5b95be4ac11a8eeed3191ebeefc38e35bb..0000000000000000000000000000000000000000
--- a/ash/wm/gestures/shelf_gesture_handler.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/wm/gestures/shelf_gesture_handler.h"
-
-#include "ash/common/session/session_state_delegate.h"
-#include "ash/common/shelf/shelf_types.h"
-#include "ash/common/system/status_area_widget.h"
-#include "ash/common/wm/window_state.h"
-#include "ash/common/wm_shell.h"
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_widget.h"
-#include "ash/wm/window_state_aura.h"
-#include "ash/wm/window_util.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/gfx/transform.h"
-#include "ui/views/widget/widget.h"
-
-namespace ash {
-
-ShelfGestureHandler::ShelfGestureHandler() : drag_in_progress_(false) {}
-
-ShelfGestureHandler::~ShelfGestureHandler() {}
-
-bool ShelfGestureHandler::ProcessGestureEvent(
- const ui::GestureEvent& event,
- const aura::Window* event_target_window) {
- // The gestures are disabled in the lock/login screen.
- SessionStateDelegate* delegate = WmShell::Get()->GetSessionStateDelegate();
- if (!delegate->NumberOfLoggedInUsers() || delegate->IsScreenLocked())
- return false;
-
- RootWindowController* controller =
- RootWindowController::ForWindow(event_target_window);
- ShelfLayoutManager* shelf = controller->GetShelfLayoutManager();
-
- if (event.type() == ui::ET_GESTURE_WIN8_EDGE_SWIPE) {
- shelf->OnGestureEdgeSwipe(event);
- return true;
- }
-
- const aura::Window* fullscreen = controller->GetWindowForFullscreenMode();
- if (fullscreen &&
- wm::GetWindowState(fullscreen)->hide_shelf_when_fullscreen()) {
- return false;
- }
-
- if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN) {
- drag_in_progress_ = true;
- shelf->StartGestureDrag(event);
- return true;
- }
-
- if (!drag_in_progress_)
- return false;
-
- if (event.type() == ui::ET_GESTURE_SCROLL_UPDATE) {
- shelf->UpdateGestureDrag(event);
- return true;
- }
-
- drag_in_progress_ = false;
-
- if (event.type() == ui::ET_GESTURE_SCROLL_END ||
- event.type() == ui::ET_SCROLL_FLING_START) {
- shelf->CompleteGestureDrag(event);
- return true;
- }
-
- // Unexpected event. Reset the state and let the event fall through.
- shelf->CancelGestureDrag();
- return false;
-}
-
-} // namespace ash
« no previous file with comments | « ash/wm/gestures/shelf_gesture_handler.h ('k') | ash/wm/immersive_fullscreen_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698