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

Side by Side Diff: content/browser/renderer_host/input/gesture_event_queue.cc

Issue 202863004: Fix "unreachable code" warnings (MSVC warning 4702) in content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/input/gesture_event_queue.h" 5 #include "content/browser/renderer_host/input/gesture_event_queue.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "content/browser/renderer_host/input/input_router.h" 10 #include "content/browser/renderer_host/input/input_router.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 case WebInputEvent::GesturePinchUpdate: 89 case WebInputEvent::GesturePinchUpdate:
90 // TODO(rjkroege): Debounce pinch (http://crbug.com/147647) 90 // TODO(rjkroege): Debounce pinch (http://crbug.com/147647)
91 return true; 91 return true;
92 default: 92 default:
93 if (scrolling_in_progress_) { 93 if (scrolling_in_progress_) {
94 debouncing_deferral_queue_.push_back(gesture_event); 94 debouncing_deferral_queue_.push_back(gesture_event);
95 return false; 95 return false;
96 } 96 }
97 return true; 97 return true;
98 } 98 }
99
100 NOTREACHED();
101 return false;
102 } 99 }
103 100
104 // NOTE: The filters are applied successively. This simplifies the change. 101 // NOTE: The filters are applied successively. This simplifies the change.
105 bool GestureEventQueue::ShouldForward( 102 bool GestureEventQueue::ShouldForward(
106 const GestureEventWithLatencyInfo& gesture_event) { 103 const GestureEventWithLatencyInfo& gesture_event) {
107 TRACE_EVENT0("input", "GestureEventQueue::ShouldForward"); 104 TRACE_EVENT0("input", "GestureEventQueue::ShouldForward");
108 return ShouldForwardForZeroVelocityFlingStart(gesture_event) && 105 return ShouldForwardForZeroVelocityFlingStart(gesture_event) &&
109 ShouldForwardForBounceReduction(gesture_event) && 106 ShouldForwardForBounceReduction(gesture_event) &&
110 ShouldForwardForGFCFiltering(gesture_event) && 107 ShouldForwardForGFCFiltering(gesture_event) &&
111 ShouldForwardForTapSuppression(gesture_event) && 108 ShouldForwardForTapSuppression(gesture_event) &&
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 ShouldDeferGestureShowPress(gesture_event); 140 ShouldDeferGestureShowPress(gesture_event);
144 case WebInputEvent::GestureTapCancel: 141 case WebInputEvent::GestureTapCancel:
145 case WebInputEvent::GestureTap: 142 case WebInputEvent::GestureTap:
146 case WebInputEvent::GestureTapUnconfirmed: 143 case WebInputEvent::GestureTapUnconfirmed:
147 case WebInputEvent::GestureDoubleTap: 144 case WebInputEvent::GestureDoubleTap:
148 return !touchscreen_tap_suppression_controller_-> 145 return !touchscreen_tap_suppression_controller_->
149 ShouldSuppressGestureTapEnd(); 146 ShouldSuppressGestureTapEnd();
150 default: 147 default:
151 return true; 148 return true;
152 } 149 }
153 NOTREACHED();
154 return false;
155 } 150 }
156 151
157 bool GestureEventQueue::ShouldForwardForCoalescing( 152 bool GestureEventQueue::ShouldForwardForCoalescing(
158 const GestureEventWithLatencyInfo& gesture_event) { 153 const GestureEventWithLatencyInfo& gesture_event) {
159 switch (gesture_event.event.type) { 154 switch (gesture_event.event.type) {
160 case WebInputEvent::GestureFlingCancel: 155 case WebInputEvent::GestureFlingCancel:
161 fling_in_progress_ = false; 156 fling_in_progress_ = false;
162 break; 157 break;
163 case WebInputEvent::GestureFlingStart: 158 case WebInputEvent::GestureFlingStart:
164 fling_in_progress_ = true; 159 fling_in_progress_ = true;
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 365
371 void GestureEventQueue::EnqueueEvent( 366 void GestureEventQueue::EnqueueEvent(
372 const GestureEventWithLatencyInfo& gesture_event) { 367 const GestureEventWithLatencyInfo& gesture_event) {
373 coalesced_gesture_events_.push_back(gesture_event); 368 coalesced_gesture_events_.push_back(gesture_event);
374 // Scroll and pinch events contributing to |combined_scroll_pinch_| will be 369 // Scroll and pinch events contributing to |combined_scroll_pinch_| will be
375 // manually added to the queue in |MergeOrInsertScrollAndPinchEvent()|. 370 // manually added to the queue in |MergeOrInsertScrollAndPinchEvent()|.
376 combined_scroll_pinch_ = gfx::Transform(); 371 combined_scroll_pinch_ = gfx::Transform();
377 } 372 }
378 373
379 } // namespace content 374 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_leveldb_coding.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698