| 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/common/wm_shell.h" | 7 #include "ash/common/wm_shell.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "ui/aura/env.h" | 10 #include "ui/aura/env.h" |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 is_single_finger_gesture_ = false; | 213 is_single_finger_gesture_ = false; |
| 214 } | 214 } |
| 215 touch_in_progress_ = true; | 215 touch_in_progress_ = true; |
| 216 last_touch_down_time_ = event.time_stamp(); | 216 last_touch_down_time_ = event.time_stamp(); |
| 217 } else if (event.type() == ui::ET_TOUCH_RELEASED) { | 217 } else if (event.type() == ui::ET_TOUCH_RELEASED) { |
| 218 if (!aura::Env::GetInstance()->is_touch_down()) | 218 if (!aura::Env::GetInstance()->is_touch_down()) |
| 219 touch_in_progress_ = false; | 219 touch_in_progress_ = false; |
| 220 } | 220 } |
| 221 } | 221 } |
| 222 | 222 |
| 223 TouchUMA::GestureActionType TouchUMA::FindGestureActionType( | 223 GestureActionType TouchUMA::FindGestureActionType( |
| 224 aura::Window* window, | 224 aura::Window* window, |
| 225 const ui::GestureEvent& event) { | 225 const ui::GestureEvent& event) { |
| 226 if (!window || window->GetRootWindow() == window) { | 226 if (!window || window->GetRootWindow() == window) { |
| 227 if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN) | 227 if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN) |
| 228 return GESTURE_BEZEL_SCROLL; | 228 return GESTURE_BEZEL_SCROLL; |
| 229 if (event.type() == ui::ET_GESTURE_BEGIN) | 229 if (event.type() == ui::ET_GESTURE_BEGIN) |
| 230 return GESTURE_BEZEL_DOWN; | 230 return GESTURE_BEZEL_DOWN; |
| 231 return GESTURE_UNKNOWN; | 231 return GESTURE_UNKNOWN; |
| 232 } | 232 } |
| 233 | 233 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 return GESTURE_OMNIBOX_SCROLL; | 290 return GESTURE_OMNIBOX_SCROLL; |
| 291 if (event.type() == ui::ET_GESTURE_PINCH_BEGIN) | 291 if (event.type() == ui::ET_GESTURE_PINCH_BEGIN) |
| 292 return GESTURE_OMNIBOX_PINCH; | 292 return GESTURE_OMNIBOX_PINCH; |
| 293 return GESTURE_UNKNOWN; | 293 return GESTURE_UNKNOWN; |
| 294 } | 294 } |
| 295 | 295 |
| 296 return GESTURE_UNKNOWN; | 296 return GESTURE_UNKNOWN; |
| 297 } | 297 } |
| 298 | 298 |
| 299 } // namespace ash | 299 } // namespace ash |
| OLD | NEW |