| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 aura::Window* window, | 225 aura::Window* window, |
| 226 const ui::GestureEvent& event) { | 226 const ui::GestureEvent& event) { |
| 227 if (!window || window->GetRootWindow() == window) { | 227 if (!window || window->GetRootWindow() == window) { |
| 228 if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN) | 228 if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN) |
| 229 return GESTURE_BEZEL_SCROLL; | 229 return GESTURE_BEZEL_SCROLL; |
| 230 if (event.type() == ui::ET_GESTURE_BEGIN) | 230 if (event.type() == ui::ET_GESTURE_BEGIN) |
| 231 return GESTURE_BEZEL_DOWN; | 231 return GESTURE_BEZEL_DOWN; |
| 232 return GESTURE_UNKNOWN; | 232 return GESTURE_UNKNOWN; |
| 233 } | 233 } |
| 234 | 234 |
| 235 std::string name = window ? window->name() : std::string(); | 235 std::string name = window ? window->GetName() : std::string(); |
| 236 | 236 |
| 237 const char kWallpaperView[] = "WallpaperView"; | 237 const char kWallpaperView[] = "WallpaperView"; |
| 238 if (name == kWallpaperView) { | 238 if (name == kWallpaperView) { |
| 239 if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN) | 239 if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN) |
| 240 return GESTURE_DESKTOP_SCROLL; | 240 return GESTURE_DESKTOP_SCROLL; |
| 241 if (event.type() == ui::ET_GESTURE_PINCH_BEGIN) | 241 if (event.type() == ui::ET_GESTURE_PINCH_BEGIN) |
| 242 return GESTURE_DESKTOP_PINCH; | 242 return GESTURE_DESKTOP_PINCH; |
| 243 return GESTURE_UNKNOWN; | 243 return GESTURE_UNKNOWN; |
| 244 } | 244 } |
| 245 | 245 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 return GESTURE_OMNIBOX_SCROLL; | 291 return GESTURE_OMNIBOX_SCROLL; |
| 292 if (event.type() == ui::ET_GESTURE_PINCH_BEGIN) | 292 if (event.type() == ui::ET_GESTURE_PINCH_BEGIN) |
| 293 return GESTURE_OMNIBOX_PINCH; | 293 return GESTURE_OMNIBOX_PINCH; |
| 294 return GESTURE_UNKNOWN; | 294 return GESTURE_UNKNOWN; |
| 295 } | 295 } |
| 296 | 296 |
| 297 return GESTURE_UNKNOWN; | 297 return GESTURE_UNKNOWN; |
| 298 } | 298 } |
| 299 | 299 |
| 300 } // namespace ash | 300 } // namespace ash |
| OLD | NEW |