Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Side by Side Diff: ash/touch/touch_uma.cc

Issue 2223553003: Adds WmShell::RecordGestureAction() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix gyp Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/touch/touch_uma.h ('k') | ash/wm/workspace/workspace_event_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/touch/touch_uma.h ('k') | ash/wm/workspace/workspace_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698