Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / ui / web_dialogs / web_dialog_web_contents_delegate.cc
index 4a3f0df..ea0006a 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "base/logging.h"
 #include "content/public/browser/web_contents.h"
+#include "third_party/WebKit/public/web/WebInputEvent.h"
 
 using content::BrowserContext;
 using content::OpenURLParams;
@@ -55,4 +56,13 @@ bool WebDialogWebContentsDelegate::IsPopupOrPanel(
   return true;
 }
 
+bool WebDialogWebContentsDelegate::PreHandleGestureEvent(
+    WebContents* source,
+    const blink::WebGestureEvent& event) {
+  // Disable pinch zooming.
+  return event.type == blink::WebGestureEvent::GesturePinchBegin ||
+      event.type == blink::WebGestureEvent::GesturePinchUpdate ||
+      event.type == blink::WebGestureEvent::GesturePinchEnd;
+}
+
 }  // namespace ui