OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_WM_GESTURES_SHELF_GESTURE_HANDLER_H_ | 5 #ifndef ASH_WM_GESTURES_SHELF_GESTURE_HANDLER_H_ |
6 #define ASH_WM_GESTURES_SHELF_GESTURE_HANDLER_H_ | 6 #define ASH_WM_GESTURES_SHELF_GESTURE_HANDLER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 | 10 |
11 namespace ui { | 11 namespace ui { |
12 class GestureEvent; | 12 class GestureEvent; |
13 } | 13 } |
14 | 14 |
15 namespace ash { | 15 namespace ash { |
16 namespace internal { | |
17 | |
18 class TrayGestureHandler; | 16 class TrayGestureHandler; |
19 | 17 |
20 // This manages gestures on the shelf (e.g. launcher, status tray) that affects | 18 // This manages gestures on the shelf (e.g. launcher, status tray) that affects |
21 // the shelf visibility. | 19 // the shelf visibility. |
22 class ShelfGestureHandler { | 20 class ShelfGestureHandler { |
23 public: | 21 public: |
24 ShelfGestureHandler(); | 22 ShelfGestureHandler(); |
25 virtual ~ShelfGestureHandler(); | 23 virtual ~ShelfGestureHandler(); |
26 | 24 |
27 // Processes a gesture event and updates the status of the shelf when | 25 // Processes a gesture event and updates the status of the shelf when |
28 // appropriate. Returns true of the gesture has been handled and it should not | 26 // appropriate. Returns true of the gesture has been handled and it should not |
29 // be processed any farther, false otherwise. | 27 // be processed any farther, false otherwise. |
30 bool ProcessGestureEvent(const ui::GestureEvent& event); | 28 bool ProcessGestureEvent(const ui::GestureEvent& event); |
31 | 29 |
32 private: | 30 private: |
33 bool drag_in_progress_; | 31 bool drag_in_progress_; |
34 | 32 |
35 scoped_ptr<TrayGestureHandler> tray_handler_; | 33 scoped_ptr<TrayGestureHandler> tray_handler_; |
36 | 34 |
37 DISALLOW_COPY_AND_ASSIGN(ShelfGestureHandler); | 35 DISALLOW_COPY_AND_ASSIGN(ShelfGestureHandler); |
38 }; | 36 }; |
39 | 37 |
40 } // namespace internal | |
41 } // namespace ash | 38 } // namespace ash |
42 | 39 |
43 #endif // ASH_WM_GESTURES_SHELF_GESTURE_HANDLER_H_ | 40 #endif // ASH_WM_GESTURES_SHELF_GESTURE_HANDLER_H_ |
OLD | NEW |