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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2737653004: UMA metrics for use count of wheel and touch scrolls. (Closed)
Patch Set: TODO for GRC usage added. Created 3 years, 9 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 | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/public/web/WebWidget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 3994 matching lines...) Expand 10 before | Expand all | Expand 10 after
4005 m_doubleTapZoomPending = false; 4005 m_doubleTapZoomPending = false;
4006 visualViewport.userDidChangeScale(); 4006 visualViewport.userDidChangeScale();
4007 } 4007 }
4008 4008
4009 m_elasticOverscroll += elasticOverscrollDelta; 4009 m_elasticOverscroll += elasticOverscrollDelta;
4010 4010
4011 if (mainFrameImpl() && mainFrameImpl()->frameView()) 4011 if (mainFrameImpl() && mainFrameImpl()->frameView())
4012 mainFrameImpl()->frameView()->didUpdateElasticOverscroll(); 4012 mainFrameImpl()->frameView()->didUpdateElasticOverscroll();
4013 } 4013 }
4014 4014
4015 void WebViewImpl::recordWheelAndTouchScrollingCount(bool hasScrolledByWheel,
4016 bool hasScrolledByTouch) {
4017 if (!page() || !page()->mainFrame())
4018 return;
4019
4020 if (hasScrolledByWheel)
4021 UseCounter::count(page()->mainFrame(), UseCounter::ScrollByWheel);
4022 if (hasScrolledByTouch)
4023 UseCounter::count(page()->mainFrame(), UseCounter::ScrollByTouch);
4024 }
4025
4015 void WebViewImpl::updateLayerTreeViewport() { 4026 void WebViewImpl::updateLayerTreeViewport() {
4016 if (!page() || !m_layerTreeView) 4027 if (!page() || !m_layerTreeView)
4017 return; 4028 return;
4018 4029
4019 m_layerTreeView->setPageScaleFactorAndLimits( 4030 m_layerTreeView->setPageScaleFactorAndLimits(
4020 pageScaleFactor(), minimumPageScaleFactor(), maximumPageScaleFactor()); 4031 pageScaleFactor(), minimumPageScaleFactor(), maximumPageScaleFactor());
4021 } 4032 }
4022 4033
4023 void WebViewImpl::updateLayerTreeBackgroundColor() { 4034 void WebViewImpl::updateLayerTreeBackgroundColor() {
4024 if (!m_layerTreeView) 4035 if (!m_layerTreeView)
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
4173 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) 4184 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame())
4174 return nullptr; 4185 return nullptr;
4175 return focusedFrame; 4186 return focusedFrame;
4176 } 4187 }
4177 4188
4178 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { 4189 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const {
4179 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4190 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4180 } 4191 }
4181 4192
4182 } // namespace blink 4193 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/public/web/WebWidget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698