Chromium Code Reviews| Index: content/public/browser/web_contents_delegate.cc |
| diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc |
| index 63ad65baeabd93980bd423d3078685cb4074f52b..f6666d5a12f1158bdd406f2b7942231511a37709 100644 |
| --- a/content/public/browser/web_contents_delegate.cc |
| +++ b/content/public/browser/web_contents_delegate.cc |
| @@ -11,6 +11,7 @@ |
| #include "content/public/browser/web_contents.h" |
| #include "content/public/common/url_constants.h" |
| #include "content/public/common/bindings_policy.h" |
| +#include "third_party/WebKit/public/web/WebInputEvent.h" |
| #include "ui/gfx/rect.h" |
| namespace content { |
| @@ -110,6 +111,15 @@ bool WebContentsDelegate::PreHandleKeyboardEvent( |
| return false; |
| } |
| +bool WebContentsDelegate::PreHandleGestureEvent( |
| + WebContents* source, |
| + const blink::WebGestureEvent& event) { |
| + // By default, swallow pinch events |
|
sadrul
2014/01/13 21:55:19
This is only on desktop, right? So check !defined(
bokan
2014/01/13 22:45:09
Yup. Added. I'm assuming Android doesn't use brows
|
| + return event.type == blink::WebGestureEvent::GesturePinchBegin || |
| + event.type == blink::WebGestureEvent::GesturePinchUpdate || |
| + event.type == blink::WebGestureEvent::GesturePinchEnd; |
| +} |
| + |
| bool WebContentsDelegate::CanDragEnter( |
| WebContents* source, |
| const DropData& data, |