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

Side by Side Diff: third_party/WebKit/Source/core/page/AutoscrollController.cpp

Issue 2302133002: Add UMA measuring pan scrolling usage. (Closed)
Patch Set: Fixed the nits Created 4 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 void AutoscrollController::startPanScrolling(LayoutBox* scrollable, const IntPoi nt& lastKnownMousePosition) 216 void AutoscrollController::startPanScrolling(LayoutBox* scrollable, const IntPoi nt& lastKnownMousePosition)
217 { 217 {
218 // We don't want to trigger the autoscroll or the panScroll if it's already active 218 // We don't want to trigger the autoscroll or the panScroll if it's already active
219 if (m_autoscrollType != NoAutoscroll) 219 if (m_autoscrollType != NoAutoscroll)
220 return; 220 return;
221 221
222 m_autoscrollType = AutoscrollForPan; 222 m_autoscrollType = AutoscrollForPan;
223 m_autoscrollLayoutObject = scrollable; 223 m_autoscrollLayoutObject = scrollable;
224 m_panScrollStartPos = lastKnownMousePosition; 224 m_panScrollStartPos = lastKnownMousePosition;
225 225
226 UseCounter::count(m_page->mainFrame(), UseCounter::PanScrollingStart);
226 startAutoscroll(); 227 startAutoscroll();
227 } 228 }
228 #else 229 #else
229 bool AutoscrollController::panScrollInProgress() const 230 bool AutoscrollController::panScrollInProgress() const
230 { 231 {
231 return false; 232 return false;
232 } 233 }
233 #endif 234 #endif
234 235
235 // FIXME: This would get get better animation fidelity if it used the monotonicF rameBeginTime instead 236 // FIXME: This would get get better animation fidelity if it used the monotonicF rameBeginTime instead
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 view->setCursor(eastPanningCursor()); 311 view->setCursor(eastPanningCursor());
311 } else if (west) { 312 } else if (west) {
312 view->setCursor(westPanningCursor()); 313 view->setCursor(westPanningCursor());
313 } else { 314 } else {
314 view->setCursor(middlePanningCursor()); 315 view->setCursor(middlePanningCursor());
315 } 316 }
316 } 317 }
317 #endif 318 #endif
318 319
319 } // namespace blink 320 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698