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

Side by Side Diff: content/renderer/input/input_handler_proxy.cc

Issue 1390163003: Cleanup of some old TODOs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/input/input_handler_proxy.h" 5 #include "content/renderer/input/input_handler_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 TRACE_EVENT_INSTANT2("input", 717 TRACE_EVENT_INSTANT2("input",
718 fling_boosted ? "InputHandlerProxy::FlingBoosted" 718 fling_boosted ? "InputHandlerProxy::FlingBoosted"
719 : "InputHandlerProxy::FlingReplaced", 719 : "InputHandlerProxy::FlingReplaced",
720 TRACE_EVENT_SCOPE_THREAD, 720 TRACE_EVENT_SCOPE_THREAD,
721 "vx", 721 "vx",
722 current_fling_velocity_.x(), 722 current_fling_velocity_.x(),
723 "vy", 723 "vy",
724 current_fling_velocity_.y()); 724 current_fling_velocity_.y());
725 725
726 // The client expects balanced calls between a consumed GestureFlingStart 726 // The client expects balanced calls between a consumed GestureFlingStart
727 // and |DidStopFlinging()|. TODO(jdduke): Provide a count parameter to 727 // and |DidStopFlinging()|.
728 // |DidStopFlinging()| and only send after the accumulated fling ends.
729 client_->DidStopFlinging(); 728 client_->DidStopFlinging();
730 return true; 729 return true;
731 } 730 }
732 731
733 default: 732 default:
734 // All other types of gestures (taps, presses, etc...) will complete the 733 // All other types of gestures (taps, presses, etc...) will complete the
735 // deferred fling cancellation. 734 // deferred fling cancellation.
736 CancelCurrentFling(); 735 CancelCurrentFling();
737 return false; 736 return false;
738 } 737 }
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 // trigger a scroll, e.g., with a trivial time delta between fling updates. 1028 // trigger a scroll, e.g., with a trivial time delta between fling updates.
1030 // Return true in this case to prevent early fling termination. 1029 // Return true in this case to prevent early fling termination.
1031 if (std::abs(clipped_increment.width) < kScrollEpsilon && 1030 if (std::abs(clipped_increment.width) < kScrollEpsilon &&
1032 std::abs(clipped_increment.height) < kScrollEpsilon) 1031 std::abs(clipped_increment.height) < kScrollEpsilon)
1033 return true; 1032 return true;
1034 1033
1035 return did_scroll; 1034 return did_scroll;
1036 } 1035 }
1037 1036
1038 } // namespace content 1037 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698