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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 10855200: Defer GestureTapDown events briefly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: proof-reading corrections Created 8 years, 4 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 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 void RenderWidgetHostImpl::ForwardGestureEvent( 921 void RenderWidgetHostImpl::ForwardGestureEvent(
922 const WebKit::WebGestureEvent& gesture_event) { 922 const WebKit::WebGestureEvent& gesture_event) {
923 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::ForwardGestureEvent"); 923 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::ForwardGestureEvent");
924 if (ignore_input_events_ || process_->IgnoreInputEvents() || 924 if (ignore_input_events_ || process_->IgnoreInputEvents() ||
925 !gesture_event_filter_->ShouldForward(gesture_event)) 925 !gesture_event_filter_->ShouldForward(gesture_event))
926 return; 926 return;
927 927
928 ForwardInputEvent(gesture_event, sizeof(WebGestureEvent), false); 928 ForwardInputEvent(gesture_event, sizeof(WebGestureEvent), false);
929 } 929 }
930 930
931 void RenderWidgetHostImpl::ForwardGestureEventImmediately(
932 const WebKit::WebGestureEvent& gesture_event) {
933 if (ignore_input_events_ || process_->IgnoreInputEvents())
934 return;
935 ForwardInputEvent(gesture_event, sizeof(WebGestureEvent), false);
936 }
937
931 void RenderWidgetHostImpl::ForwardKeyboardEvent( 938 void RenderWidgetHostImpl::ForwardKeyboardEvent(
932 const NativeWebKeyboardEvent& key_event) { 939 const NativeWebKeyboardEvent& key_event) {
933 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::ForwardKeyboardEvent"); 940 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::ForwardKeyboardEvent");
934 if (ignore_input_events_ || process_->IgnoreInputEvents()) 941 if (ignore_input_events_ || process_->IgnoreInputEvents())
935 return; 942 return;
936 943
937 if (key_event.type == WebKeyboardEvent::Char && 944 if (key_event.type == WebKeyboardEvent::Char &&
938 (key_event.windowsKeyCode == ui::VKEY_RETURN || 945 (key_event.windowsKeyCode == ui::VKEY_RETURN ||
939 key_event.windowsKeyCode == ui::VKEY_SPACE)) { 946 key_event.windowsKeyCode == ui::VKEY_SPACE)) {
940 OnUserGesture(); 947 OnUserGesture();
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
2014 // indicate that no callback is in progress (i.e. without this line 2021 // indicate that no callback is in progress (i.e. without this line
2015 // DelayedAutoResized will not get called again). 2022 // DelayedAutoResized will not get called again).
2016 new_auto_size_.SetSize(0, 0); 2023 new_auto_size_.SetSize(0, 0);
2017 if (!should_auto_resize_) 2024 if (!should_auto_resize_)
2018 return; 2025 return;
2019 2026
2020 OnRenderAutoResized(new_size); 2027 OnRenderAutoResized(new_size);
2021 } 2028 }
2022 2029
2023 } // namespace content 2030 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/browser/renderer_host/render_widget_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698