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

Side by Side Diff: content/browser/renderer_host/render_widget_host_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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 934
935 void RenderWidgetHostImpl::OnPointerEventActivate() { 935 void RenderWidgetHostImpl::OnPointerEventActivate() {
936 } 936 }
937 937
938 void RenderWidgetHostImpl::ForwardWheelEvent( 938 void RenderWidgetHostImpl::ForwardWheelEvent(
939 const WebMouseWheelEvent& wheel_event) { 939 const WebMouseWheelEvent& wheel_event) {
940 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::ForwardWheelEvent"); 940 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::ForwardWheelEvent");
941 if (ignore_input_events_ || process_->IgnoreInputEvents()) 941 if (ignore_input_events_ || process_->IgnoreInputEvents())
942 return; 942 return;
943 943
944 if (delegate_->PreHandleWheelEvent(wheel_event))
945 return;
946
944 // If there's already a mouse wheel event waiting to be sent to the renderer, 947 // If there's already a mouse wheel event waiting to be sent to the renderer,
945 // add the new deltas to that event. Not doing so (e.g., by dropping the old 948 // add the new deltas to that event. Not doing so (e.g., by dropping the old
946 // event, as for mouse moves) results in very slow scrolling on the Mac (on 949 // event, as for mouse moves) results in very slow scrolling on the Mac (on
947 // which many, very small wheel events are sent). 950 // which many, very small wheel events are sent).
948 if (mouse_wheel_pending_) { 951 if (mouse_wheel_pending_) {
949 if (coalesced_mouse_wheel_events_.empty() || 952 if (coalesced_mouse_wheel_events_.empty() ||
950 !ShouldCoalesceMouseWheelEvents(coalesced_mouse_wheel_events_.back(), 953 !ShouldCoalesceMouseWheelEvents(coalesced_mouse_wheel_events_.back(),
951 wheel_event)) { 954 wheel_event)) {
952 coalesced_mouse_wheel_events_.push_back(wheel_event); 955 coalesced_mouse_wheel_events_.push_back(wheel_event);
953 } else { 956 } else {
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after
2391 return; 2394 return;
2392 2395
2393 OnRenderAutoResized(new_size); 2396 OnRenderAutoResized(new_size);
2394 } 2397 }
2395 2398
2396 void RenderWidgetHostImpl::DetachDelegate() { 2399 void RenderWidgetHostImpl::DetachDelegate() {
2397 delegate_ = NULL; 2400 delegate_ = NULL;
2398 } 2401 }
2399 2402
2400 } // namespace content 2403 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698