Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 VIEWS_TOUCHUI_GESTURE_MANAGER_H_ | 5 #ifndef VIEWS_TOUCHUI_GESTURE_MANAGER_H_ |
| 6 #define VIEWS_TOUCHUI_GESTURE_MANAGER_H_ | 6 #define VIEWS_TOUCHUI_GESTURE_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "views/touchui/gesture_recognizer.h" | |
| 10 #include "views/view.h" | 11 #include "views/view.h" |
| 11 | 12 |
| 12 namespace ui { | 13 namespace ui { |
| 13 enum TouchStatus; | 14 enum TouchStatus; |
| 14 } | 15 } |
| 15 | 16 |
| 16 namespace views { | 17 namespace views { |
| 17 class TouchEvent; | 18 class TouchEvent; |
| 18 | 19 |
| 19 // A GestureManager singleton detects gestures occurring in the | 20 // A GestureManager singleton detects gestures occurring in the |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 41 | 42 |
| 42 // TODO(rjkroege): Write the remainder of this class. | 43 // TODO(rjkroege): Write the remainder of this class. |
| 43 // It will appear in a subsequent CL. | 44 // It will appear in a subsequent CL. |
| 44 | 45 |
| 45 protected: | 46 protected: |
| 46 GestureManager(); | 47 GestureManager(); |
| 47 | 48 |
| 48 private: | 49 private: |
| 49 friend struct DefaultSingletonTraits<GestureManager>; | 50 friend struct DefaultSingletonTraits<GestureManager>; |
| 50 | 51 |
| 52 // Source view's RootView, This instance is not owned by GestureManager. | |
| 53 // See ProcessTouchEventForGesture() for source definition. | |
| 54 // Note: Simultaneous Gestures happening across two different RootViews are | |
| 55 // Not Recognized. Exception to this is TYPE_CHILD widget which still could | |
| 56 // be NativeWidgetGtk. | |
| 57 RootView* root_view_; | |
|
rjkroege
2011/10/24 17:41:09
Why do we need this pointer when the view of inter
Gajen
2011/10/25 14:32:29
GestureManager being singleton, can be in all poss
| |
| 58 | |
| 59 // GestureRecognizer instance. | |
| 60 GestureRecognizer gesture_recognizer; | |
|
rjkroege
2011/10/24 17:41:09
members need a trailing _
More general observatio
Gajen
2011/10/25 14:32:29
Done
| |
| 61 | |
| 51 DISALLOW_COPY_AND_ASSIGN(GestureManager); | 62 DISALLOW_COPY_AND_ASSIGN(GestureManager); |
| 52 }; | 63 }; |
| 53 | 64 |
| 54 | 65 |
| 55 } // namespace views | 66 } // namespace views |
| 56 | 67 |
| 57 #endif // VIEWS_TOUCHUI_GESTURE_MANAGER_H_ | 68 #endif // VIEWS_TOUCHUI_GESTURE_MANAGER_H_ |
| OLD | NEW |