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

Unified Diff: ui/keyboard/keyboard_controller_proxy.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
Index: ui/keyboard/keyboard_controller_proxy.cc
diff --git a/ui/keyboard/keyboard_controller_proxy.cc b/ui/keyboard/keyboard_controller_proxy.cc
index fb6f04d9edeffb08e53a01d112e563bd3e0e7156..1f40aad31f3010af13994df2a11acca13c7f144e 100644
--- a/ui/keyboard/keyboard_controller_proxy.cc
+++ b/ui/keyboard/keyboard_controller_proxy.cc
@@ -13,6 +13,7 @@
#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui.h"
#include "content/public/common/bindings_policy.h"
+#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/aura/layout_manager.h"
#include "ui/aura/window.h"
#include "ui/keyboard/keyboard_constants.h"
@@ -95,6 +96,14 @@ class KeyboardContentsDelegate : public content::WebContentsDelegate,
const content::MediaResponseCallback& callback) OVERRIDE {
proxy_->RequestAudioInput(web_contents, request, callback);
}
+ virtual bool PreHandleGestureEvent(
+ content::WebContents* source,
+ const blink::WebGestureEvent& event) OVERRIDE {
+ // Disable pinch zooming.
+ return event.type == blink::WebGestureEvent::GesturePinchBegin ||
+ event.type == blink::WebGestureEvent::GesturePinchUpdate ||
+ event.type == blink::WebGestureEvent::GesturePinchEnd;
+ }
// Overridden from content::WebContentsObserver:

Powered by Google App Engine
This is Rietveld 408576698