| 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_TOUCH_TOUCH_OBSERVER_UMA_H_ | 5 #ifndef ASH_TOUCH_TOUCH_OBSERVER_UMA_H_ |
| 6 #define ASH_TOUCH_TOUCH_OBSERVER_UMA_H_ | 6 #define ASH_TOUCH_TOUCH_OBSERVER_UMA_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include "ash/ash_export.h" |
| 9 | |
| 10 #include "ash/common/metrics/gesture_action_type.h" | 9 #include "ash/common/metrics/gesture_action_type.h" |
| 11 #include "ash/shell.h" | |
| 12 #include "base/macros.h" | 10 #include "base/macros.h" |
| 13 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
| 14 #include "ui/gfx/geometry/point.h" | |
| 15 #include "ui/views/widget/widget.h" | |
| 16 | 12 |
| 17 namespace aura { | 13 namespace aura { |
| 18 class Window; | 14 class Window; |
| 19 } | 15 } |
| 20 | 16 |
| 17 namespace ui { |
| 18 class GestureEvent; |
| 19 class TouchEvent; |
| 20 } |
| 21 |
| 22 namespace gfx { |
| 23 class Point; |
| 24 } |
| 25 |
| 21 namespace ash { | 26 namespace ash { |
| 22 | 27 |
| 23 // Records some touch/gesture event specific details (e.g. what gestures are | 28 // Records some touch/gesture event specific details (e.g. what gestures are |
| 24 // targetted to which components etc.) | 29 // targetted to which components etc.) |
| 25 class ASH_EXPORT TouchUMA { | 30 class ASH_EXPORT TouchUMA { |
| 26 public: | 31 public: |
| 27 // Returns the singleton instance. | 32 // Returns the singleton instance. |
| 28 static TouchUMA* GetInstance(); | 33 static TouchUMA* GetInstance(); |
| 29 | 34 |
| 30 void RecordGestureEvent(aura::Window* target, const ui::GestureEvent& event); | 35 void RecordGestureEvent(aura::Window* target, const ui::GestureEvent& event); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 47 bool touch_in_progress_; | 52 bool touch_in_progress_; |
| 48 int burst_length_; | 53 int burst_length_; |
| 49 base::TimeTicks last_touch_down_time_; | 54 base::TimeTicks last_touch_down_time_; |
| 50 | 55 |
| 51 DISALLOW_COPY_AND_ASSIGN(TouchUMA); | 56 DISALLOW_COPY_AND_ASSIGN(TouchUMA); |
| 52 }; | 57 }; |
| 53 | 58 |
| 54 } // namespace ash | 59 } // namespace ash |
| 55 | 60 |
| 56 #endif // ASH_TOUCH_TOUCH_OBSERVER_UMA_H_ | 61 #endif // ASH_TOUCH_TOUCH_OBSERVER_UMA_H_ |
| OLD | NEW |