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

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

Issue 1417903005: Revert of Remove DCHECK_IMPLIES/CHECK_IMPLIES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « content/renderer/gpu/mailbox_output_surface.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 "InputHandlerProxy::ExtendBoostedFlingTimeout", 750 "InputHandlerProxy::ExtendBoostedFlingTimeout",
751 TRACE_EVENT_SCOPE_THREAD); 751 TRACE_EVENT_SCOPE_THREAD);
752 deferred_fling_cancel_time_seconds_ = 752 deferred_fling_cancel_time_seconds_ =
753 event.timeStampSeconds + kFlingBoostTimeoutDelaySeconds; 753 event.timeStampSeconds + kFlingBoostTimeoutDelaySeconds;
754 last_fling_boost_event_ = event; 754 last_fling_boost_event_ = event;
755 } 755 }
756 756
757 void InputHandlerProxy::Animate(base::TimeTicks time) { 757 void InputHandlerProxy::Animate(base::TimeTicks time) {
758 // If using synchronous animate, then only expect Animate attempts started by 758 // If using synchronous animate, then only expect Animate attempts started by
759 // the synchronous system. Don't let the InputHandler try to Animate also. 759 // the synchronous system. Don't let the InputHandler try to Animate also.
760 DCHECK(!input_handler_->IsCurrentlyScrollingInnerViewport() || 760 DCHECK_IMPLIES(input_handler_->IsCurrentlyScrollingInnerViewport(),
761 allow_root_animate_); 761 allow_root_animate_);
762 762
763 if (scroll_elasticity_controller_) 763 if (scroll_elasticity_controller_)
764 scroll_elasticity_controller_->Animate(time); 764 scroll_elasticity_controller_->Animate(time);
765 765
766 if (!fling_curve_) 766 if (!fling_curve_)
767 return; 767 return;
768 768
769 last_fling_animate_time_ = time; 769 last_fling_animate_time_ = time;
770 double monotonic_time_sec = InSecondsF(time); 770 double monotonic_time_sec = InSecondsF(time);
771 771
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 // trigger a scroll, e.g., with a trivial time delta between fling updates. 1039 // trigger a scroll, e.g., with a trivial time delta between fling updates.
1040 // Return true in this case to prevent early fling termination. 1040 // Return true in this case to prevent early fling termination.
1041 if (std::abs(clipped_increment.width) < kScrollEpsilon && 1041 if (std::abs(clipped_increment.width) < kScrollEpsilon &&
1042 std::abs(clipped_increment.height) < kScrollEpsilon) 1042 std::abs(clipped_increment.height) < kScrollEpsilon)
1043 return true; 1043 return true;
1044 1044
1045 return did_scroll; 1045 return did_scroll;
1046 } 1046 }
1047 1047
1048 } // namespace content 1048 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/mailbox_output_surface.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698