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

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

Issue 2842203002: Forward GestureFlingStart in OOPIF, re-enable DCHECK. (Closed)
Patch Set: Add test. Created 3 years, 7 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
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 8
9 #include <set> 9 #include <set>
10 #include <tuple> 10 #include <tuple>
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 blink::WebGestureDevice::kWebGestureDeviceTouchpad 1116 blink::WebGestureDevice::kWebGestureDeviceTouchpad
1117 ? &is_in_touchpad_gesture_scroll_ 1117 ? &is_in_touchpad_gesture_scroll_
1118 : &is_in_touchscreen_gesture_scroll_; 1118 : &is_in_touchscreen_gesture_scroll_;
1119 if (gesture_event.GetType() == blink::WebInputEvent::kGestureScrollBegin) { 1119 if (gesture_event.GetType() == blink::WebInputEvent::kGestureScrollBegin) {
1120 DCHECK(!(*is_in_gesture_scroll)); 1120 DCHECK(!(*is_in_gesture_scroll));
1121 *is_in_gesture_scroll = true; 1121 *is_in_gesture_scroll = true;
1122 } else if (gesture_event.GetType() == 1122 } else if (gesture_event.GetType() ==
1123 blink::WebInputEvent::kGestureScrollEnd || 1123 blink::WebInputEvent::kGestureScrollEnd ||
1124 gesture_event.GetType() == 1124 gesture_event.GetType() ==
1125 blink::WebInputEvent::kGestureFlingStart) { 1125 blink::WebInputEvent::kGestureFlingStart) {
1126 // TODO(wjmaclean): Re-enable the following DCHECK once crbug.com/695187 1126 DCHECK(
1127 // is fixed. 1127 *is_in_gesture_scroll ||
1128 // DCHECK(*is_in_gesture_scroll || 1128 (gesture_event.GetType() == blink::WebInputEvent::kGestureFlingStart &&
1129 // (gesture_event.type() == blink::WebInputEvent::GestureFlingStart && 1129 gesture_event.source_device ==
1130 // gesture_event.sourceDevice == 1130 blink::WebGestureDevice::kWebGestureDeviceTouchpad));
1131 // blink::WebGestureDevice::WebGestureDeviceTouchpad));
1132 *is_in_gesture_scroll = false; 1131 *is_in_gesture_scroll = false;
1133 if (gesture_event.GetType() == blink::WebInputEvent::kGestureFlingStart && 1132 if (gesture_event.GetType() == blink::WebInputEvent::kGestureFlingStart &&
1134 gesture_event.source_device == 1133 gesture_event.source_device ==
1135 blink::WebGestureDevice::kWebGestureDeviceTouchpad) { 1134 blink::WebGestureDevice::kWebGestureDeviceTouchpad) {
1136 is_in_touchpad_gesture_fling_ = true; 1135 is_in_touchpad_gesture_fling_ = true;
1137 } 1136 }
1138 } 1137 }
1139 1138
1140 bool scroll_update_needs_wrapping = 1139 bool scroll_update_needs_wrapping =
1141 gesture_event.GetType() == blink::WebInputEvent::kGestureScrollUpdate && 1140 gesture_event.GetType() == blink::WebInputEvent::kGestureScrollUpdate &&
(...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after
2642 RenderProcessHost* rph = GetProcess(); 2641 RenderProcessHost* rph = GetProcess();
2643 for (std::vector<IPC::Message>::const_iterator i = messages.begin(); 2642 for (std::vector<IPC::Message>::const_iterator i = messages.begin();
2644 i != messages.end(); ++i) { 2643 i != messages.end(); ++i) {
2645 rph->OnMessageReceived(*i); 2644 rph->OnMessageReceived(*i);
2646 if (i->dispatch_error()) 2645 if (i->dispatch_error())
2647 rph->OnBadMessageReceived(*i); 2646 rph->OnBadMessageReceived(*i);
2648 } 2647 }
2649 } 2648 }
2650 2649
2651 } // namespace content 2650 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698