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

Unified Diff: Source/web/ChromeClientImpl.cpp

Issue 16507017: Initial touch-action main thread implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Don't add delay param to public API just yet Created 7 years, 1 month 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: Source/web/ChromeClientImpl.cpp
diff --git a/Source/web/ChromeClientImpl.cpp b/Source/web/ChromeClientImpl.cpp
index 9890f9f148f9a4c3f33ab7de80d928541f249f42..e38292d108c73b209a29b9f046c93d053457e67f 100644
--- a/Source/web/ChromeClientImpl.cpp
+++ b/Source/web/ChromeClientImpl.cpp
@@ -950,6 +950,27 @@ void ChromeClientImpl::needTouchEvents(bool needsTouchEvents)
m_webView->hasTouchEventHandlers(needsTouchEvents);
}
+void ChromeClientImpl::setTouchAction(int touchId, TouchAction touchAction)
+{
+ WebViewClient* client = m_webView->client();
+ if (client) {
+ WebWidgetClient::TouchAction webTouchAction;
+ switch (touchAction) {
+ case TouchActionNone:
+ webTouchAction = WebWidgetClient::TouchActionNone;
+ break;
+ case TouchActionAuto:
+ webTouchAction = WebWidgetClient::TouchActionAuto;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ webTouchAction = WebWidgetClient::TouchActionAuto;
+ }
+
+ client->setTouchAction(touchId, webTouchAction);
abarth-chromium 2013/11/18 21:16:59 Usually we just use a static_cast and COMPILE_ASSE
Rick Byers 2013/11/19 21:24:21 Done.
+ }
+}
+
bool ChromeClientImpl::requestPointerLock()
{
return m_webView->requestPointerLock();

Powered by Google App Engine
This is Rietveld 408576698