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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 12221144: Make zoom using ctrl+mouse wheel work in win aura. Windows -non-aura had a hack that was a layering… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 10 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: content/browser/web_contents/web_contents_impl.cc
===================================================================
--- content/browser/web_contents/web_contents_impl.cc (revision 180972)
+++ content/browser/web_contents/web_contents_impl.cc (working copy)
@@ -1320,6 +1320,18 @@
delegate_->HandleKeyboardEvent(this, event);
}
+bool WebContentsImpl::PreHandleWheelEvent(
+ const WebKit::WebMouseWheelEvent& event) {
+ if (delegate_ &&
+ event.wheelTicksY &&
+ (event.modifiers & WebKit::WebInputEvent::ControlKey)) {
+ delegate_->ContentsZoomChange(event.wheelTicksY > 0);
+ return true;
+ }
+
+ return false;
+}
+
void WebContentsImpl::HandleMouseDown() {
if (delegate_)
delegate_->HandleMouseDown();
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/browser/web_contents/web_contents_view_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698