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

Unified Diff: ash/shelf/shelf_layout_manager.h

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/shelf/shelf_bezel_event_filter.cc ('k') | ash/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager.h
diff --git a/ash/shelf/shelf_layout_manager.h b/ash/shelf/shelf_layout_manager.h
index 1aa5039aa8ac27d770260aae7cbf395290db7cde..ab237b27655a8d16c61072f4e8ecc54a61a90e01 100644
--- a/ash/shelf/shelf_layout_manager.h
+++ b/ash/shelf/shelf_layout_manager.h
@@ -18,7 +18,6 @@
#include "ash/common/wm/workspace/workspace_types.h"
#include "ash/common/wm_activation_observer.h"
#include "ash/shelf/shelf_widget.h"
-#include "ash/wm/gestures/shelf_gesture_handler.h"
#include "base/macros.h"
#include "base/observer_list.h"
#include "base/timer/timer.h"
@@ -120,12 +119,10 @@ class ASH_EXPORT ShelfLayoutManager
void AddObserver(ShelfLayoutManagerObserver* observer);
void RemoveObserver(ShelfLayoutManagerObserver* observer);
- // Gesture related functions:
- void OnGestureEdgeSwipe(const ui::GestureEvent& gesture);
- void StartGestureDrag(const ui::GestureEvent& gesture);
- void UpdateGestureDrag(const ui::GestureEvent& gesture);
- void CompleteGestureDrag(const ui::GestureEvent& gesture);
- void CancelGestureDrag();
+ // Processes a gesture event and updates the status of the shelf when
+ // appropriate. Returns true if the gesture has been handled and it should not
+ // be processed any further, false otherwise.
+ bool ProcessGestureEvent(const ui::GestureEvent& event);
// Set an animation duration override for the show / hide animation of the
// shelf. Specifying 0 leads to use the default.
@@ -294,6 +291,16 @@ class ASH_EXPORT ShelfLayoutManager
// Compute |target_bounds| opacity based on gesture and shelf visibility.
float ComputeTargetOpacity(const State& state);
+ // Returns true if there is a fullscreen window open that causes the shelf
+ // to be hidden.
+ bool IsShelfHiddenForFullscreen() const;
+
+ // Gesture related functions:
+ void StartGestureDrag(const ui::GestureEvent& gesture);
+ void UpdateGestureDrag(const ui::GestureEvent& gesture);
+ void CompleteGestureDrag(const ui::GestureEvent& gesture);
+ void CancelGestureDrag();
+
// The RootWindow is cached so that we don't invoke Shell::GetInstance() from
// our destructor. We avoid that as at the time we're deleted Shell is being
// deleted too.
@@ -330,8 +337,6 @@ class ASH_EXPORT ShelfLayoutManager
base::ObserverList<ShelfLayoutManagerObserver> observers_;
- ShelfGestureHandler gesture_handler_;
-
// The shelf reacts to gesture-drags, and can be set to auto-hide for certain
// gestures. Some shelf behaviour (e.g. visibility state, background color
// etc.) are affected by various stages of the drag. The enum keeps track of
« no previous file with comments | « ash/shelf/shelf_bezel_event_filter.cc ('k') | ash/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698