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

Unified Diff: content/public/browser/web_contents_delegate.cc

Issue 134683004: Disabled pinch zooming in non-browser Aura windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
« no previous file with comments | « content/public/browser/web_contents_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « content/public/browser/web_contents_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698