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

Unified Diff: ash/wm/gestures/border_gesture_handler.h

Issue 15931005: Move bezel event routing for the shelf into ShelfLayoutManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed failing test after discussing with sadrul Created 7 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
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/wm/gestures/border_gesture_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/gestures/border_gesture_handler.h
diff --git a/ash/wm/gestures/border_gesture_handler.h b/ash/wm/gestures/border_gesture_handler.h
deleted file mode 100644
index fe188f287d56ce60d7b0d1e76b614d966cc9e025..0000000000000000000000000000000000000000
--- a/ash/wm/gestures/border_gesture_handler.h
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright (c) 2013 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.
-
-#ifndef ASH_WM_GESTURES_BORDER_GESTURE_HANDLER_H_
-#define ASH_WM_GESTURES_BORDER_GESTURE_HANDLER_H_
-
-#include <bitset>
-
-#include "ash/shelf/shelf_types.h"
-#include "ash/wm/gestures/shelf_gesture_handler.h"
-#include "base/basictypes.h"
-
-namespace aura {
-class Window;
-}
-
-namespace gfx {
-class Point;
-class Rect;
-}
-
-namespace ui {
-class GestureEvent;
-}
-
-namespace ash {
-namespace internal {
-
-enum BorderScrollOrientation {
- BORDER_SCROLL_ORIENTATION_UNSET = 0,
- BORDER_SCROLL_ORIENTATION_HORIZONTAL,
- BORDER_SCROLL_ORIENTATION_VERTICAL
-};
-
-// Bit positions of border location flags
-enum BorderLocation {
- BORDER_LOCATION_BOTTOM = 0,
- BORDER_LOCATION_LEFT = 1,
- BORDER_LOCATION_TOP = 2,
- BORDER_LOCATION_RIGHT = 3,
- NUM_BORDER_LOCATIONS
-};
-
-typedef std::bitset<NUM_BORDER_LOCATIONS> BorderFlags;
-
-// Handles touch gestures that occur around the border of the display area that
-// might have actions associated with them. It handles both gestures that
-// require a bezel sensor (bezel gestures) and those that do not (edge
-// gestures).
-class BorderGestureHandler {
- public:
- BorderGestureHandler();
- ~BorderGestureHandler();
-
- // Returns true of the gesture has been handled and it should not be processed
- // any farther, false otherwise.
- bool ProcessGestureEvent(aura::Window* target, const ui::GestureEvent& event);
-
- private:
- // Handle events meant for showing the launcher. Returns true when no further
- // events from this gesture should be sent.
- bool HandleLauncherControl(const ui::GestureEvent& event);
-
- bool HandleBorderGestureStart(aura::Window* target,
- const ui::GestureEvent& event);
-
- // Handles a gesture update once the orientation has been found.
- bool HandleBorderGestureUpdate(aura::Window* target,
- const ui::GestureEvent& event);
-
- bool HandleBorderGestureEnd(aura::Window* target,
- const ui::GestureEvent& event);
-
- // Check that gesture starts on a bezel or in the edge region of the
- // screen. If so, set bits in |start_location_|.
- void GestureStartInTargetArea(const gfx::Rect& screen,
- const ui::GestureEvent& event);
-
- // Determine the gesture orientation (if not yet done).
- // Returns true when the orientation has been successfully determined.
- bool DetermineGestureOrientation(const ui::GestureEvent& event);
-
- // Test if the gesture orientation makes sense to be dragging in or out the
- // launcher.
- bool IsGestureInLauncherOrientation(const ui::GestureEvent& event);
-
- // Which bezel/edges the gesture started in. In the case that a gesture begins
- // in a corner of the screen more then one flag may be set and the orientation
- // of the gesture will be needed to disambiguate.
- BorderFlags start_location_;
-
- // Orientation relative to the screen that the gesture is moving in
- BorderScrollOrientation orientation_;
-
- ShelfGestureHandler shelf_handler_;
-
- DISALLOW_COPY_AND_ASSIGN(BorderGestureHandler);
-};
-
-} // namespace internal
-} // namespace ash
-#endif // ASH_WM_GESTURES_BORDER_GESTURE_HANDLER_H_
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/wm/gestures/border_gesture_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698