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

Unified Diff: content/renderer/render_widget.cc

Issue 67383002: Initial browser-side implementation for touch-action (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add back accidentally removed line 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
« content/public/common/touch_action.h ('K') | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 7cd7c33f25e6cdde639dd4d063878ba529acddc5..b1786bb42087e1581ab41b1eece48e38ba177763 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -2783,6 +2783,23 @@ void RenderWidget::hasTouchEventHandlers(bool has_handlers) {
Send(new ViewHostMsg_HasTouchEventHandlers(routing_id_, has_handlers));
}
+void RenderWidget::setTouchAction(int touchId,
+ WebWidgetClient::TouchAction touchAction) {
+ content::TouchAction contentTouchAction;
sadrul 2013/11/19 10:36:44 touch_id, touch_action, etc.
Rick Byers 2013/11/19 22:14:59 Dammit, sorry - I'll never get used to switching b
+ switch(touchAction) {
+ case WebWidgetClient::TouchActionNone:
sadrul 2013/11/19 10:36:44 indent
Rick Byers 2013/11/19 22:14:59 Done.
+ contentTouchAction = content::TOUCH_ACTION_NONE;
+ break;
+ case WebWidgetClient::TouchActionAuto:
+ contentTouchAction = content::TOUCH_ACTION_AUTO;
+ break;
+ default:
+ NOTREACHED();
+ }
+ Send(new ViewHostMsg_SetTouchAction(routing_id_, touchId,
+ contentTouchAction));
+}
+
bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const {
return true;
}
« content/public/common/touch_action.h ('K') | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698