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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1358173008: Add UMA stats for pinch-zoom behavior on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index a20c4c51ab3c0c1208d5c916a971d4eb0e729c4e..51b48b97066a306fe0cbb49fa3afa8aa12af1c6d 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -2072,6 +2072,8 @@ bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent)
autofillClient->firstUserGestureObserved();
}
+ page()->frameHost().visualViewport().startTrackingPinchStats();
Yoav Weiss 2015/09/25 08:46:59 Would that mean that we start tracking pinch zoom
bokan 2015/09/25 17:01:48 Yes, I use it more as a signal that this is someth
+
TRACE_EVENT1("input", "WebViewImpl::handleInputEvent", "type", inputTypeToName(inputEvent.type).ascii());
// If we've started a drag and drop operation, ignore input events until
// we're done.
@@ -4227,8 +4229,10 @@ void WebViewImpl::applyViewportDeltas(
visualViewportOffset.move(visualViewportDelta.width, visualViewportDelta.height);
setPageScaleFactorAndLocation(pageScaleFactor() * pageScaleDelta, visualViewportOffset);
- if (pageScaleDelta != 1)
+ if (pageScaleDelta != 1) {
Yoav Weiss 2015/09/25 08:46:59 What's the pageScaleDelta value in non-mobile zoom
bokan 2015/09/25 17:01:48 This is the delta coming from the compositor. As s
m_doubleTapZoomPending = false;
+ page()->frameHost().visualViewport().userDidChangeScale();
+ }
m_elasticOverscroll += elasticOverscrollDelta;
frameView->didUpdateElasticOverscroll();

Powered by Google App Engine
This is Rietveld 408576698