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 #include "ash/touch/touch_uma.h" | 5 #include "ash/touch/touch_uma.h" |
6 | 6 |
7 #include "ash/metrics/user_metrics_recorder.h" | 7 #include "ash/metrics/user_metrics_recorder.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 // multi-touch gesture on the window, then this is the release-time of the | 39 // multi-touch gesture on the window, then this is the release-time of the |
40 // last touch on the window). | 40 // last touch on the window). |
41 base::TimeDelta last_mt_time_; | 41 base::TimeDelta last_mt_time_; |
42 }; | 42 }; |
43 | 43 |
44 DEFINE_OWNED_WINDOW_PROPERTY_KEY(WindowTouchDetails, | 44 DEFINE_OWNED_WINDOW_PROPERTY_KEY(WindowTouchDetails, |
45 kWindowTouchDetails, | 45 kWindowTouchDetails, |
46 NULL); | 46 NULL); |
47 } | 47 } |
48 | 48 |
| 49 DECLARE_WINDOW_PROPERTY_TYPE(WindowTouchDetails*); |
| 50 |
49 namespace ash { | 51 namespace ash { |
50 | 52 |
51 // static | 53 // static |
52 TouchUMA* TouchUMA::GetInstance() { | 54 TouchUMA* TouchUMA::GetInstance() { |
53 return Singleton<TouchUMA>::get(); | 55 return Singleton<TouchUMA>::get(); |
54 } | 56 } |
55 | 57 |
56 void TouchUMA::RecordGestureEvent(aura::Window* target, | 58 void TouchUMA::RecordGestureEvent(aura::Window* target, |
57 const ui::GestureEvent& event) { | 59 const ui::GestureEvent& event) { |
58 GestureActionType action = FindGestureActionType(target, event); | 60 GestureActionType action = FindGestureActionType(target, event); |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 return GESTURE_OMNIBOX_SCROLL; | 297 return GESTURE_OMNIBOX_SCROLL; |
296 if (event.type() == ui::ET_GESTURE_PINCH_BEGIN) | 298 if (event.type() == ui::ET_GESTURE_PINCH_BEGIN) |
297 return GESTURE_OMNIBOX_PINCH; | 299 return GESTURE_OMNIBOX_PINCH; |
298 return GESTURE_UNKNOWN; | 300 return GESTURE_UNKNOWN; |
299 } | 301 } |
300 | 302 |
301 return GESTURE_UNKNOWN; | 303 return GESTURE_UNKNOWN; |
302 } | 304 } |
303 | 305 |
304 } // namespace ash | 306 } // namespace ash |
OLD | NEW |