| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_WM_GESTURES_SHELF_GESTURE_HANDLER_H_ | |
| 6 #define ASH_WM_GESTURES_SHELF_GESTURE_HANDLER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 | |
| 10 namespace aura { | |
| 11 class Window; | |
| 12 } // namespace aura | |
| 13 | |
| 14 namespace ui { | |
| 15 class GestureEvent; | |
| 16 } // namespace ui | |
| 17 | |
| 18 namespace ash { | |
| 19 | |
| 20 // This manages gestures on the shelf (e.g. launcher, status tray) that affects | |
| 21 // the shelf visibility. | |
| 22 // TODO(jamescook): Consolidate this with ShelfLayoutManager and its notion of | |
| 23 // drag status. | |
| 24 class ShelfGestureHandler { | |
| 25 public: | |
| 26 ShelfGestureHandler(); | |
| 27 virtual ~ShelfGestureHandler(); | |
| 28 | |
| 29 // Processes a gesture event and updates the status of the shelf when | |
| 30 // appropriate. Returns true of the gesture has been handled and it should not | |
| 31 // be processed any farther, false otherwise. | |
| 32 // The caller must provide the |event_target_window| because the caller has | |
| 33 // knowledge of the type of the |event.target()| whether it's a |views::View| | |
| 34 // or an |aura::Window|. | |
| 35 bool ProcessGestureEvent(const ui::GestureEvent& event, | |
| 36 const aura::Window* event_target_window); | |
| 37 | |
| 38 private: | |
| 39 bool drag_in_progress_; | |
| 40 | |
| 41 DISALLOW_COPY_AND_ASSIGN(ShelfGestureHandler); | |
| 42 }; | |
| 43 | |
| 44 } // namespace ash | |
| 45 | |
| 46 #endif // ASH_WM_GESTURES_SHELF_GESTURE_HANDLER_H_ | |
| OLD | NEW |