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

Side by Side Diff: cc/input/top_controls_manager.cc

Issue 1421483005: Reland: 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 | « cc/animation/animation_player.cc ('k') | cc/layers/picture_layer.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 "cc/input/top_controls_manager.h" 5 #include "cc/input/top_controls_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "cc/animation/keyframed_animation_curve.h" 10 #include "cc/animation/keyframed_animation_curve.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 return scroll_delta; 169 return scroll_delta;
170 } 170 }
171 171
172 void TopControlsManager::ResetAnimations() { 172 void TopControlsManager::ResetAnimations() {
173 top_controls_animation_ = nullptr; 173 top_controls_animation_ = nullptr;
174 animation_direction_ = NO_ANIMATION; 174 animation_direction_ = NO_ANIMATION;
175 } 175 }
176 176
177 void TopControlsManager::SetupAnimation(AnimationDirection direction) { 177 void TopControlsManager::SetupAnimation(AnimationDirection direction) {
178 DCHECK_NE(NO_ANIMATION, direction); 178 DCHECK_NE(NO_ANIMATION, direction);
179 DCHECK_IMPLIES(direction == HIDING_CONTROLS, TopControlsShownRatio() > 0.f); 179 DCHECK(direction != HIDING_CONTROLS || TopControlsShownRatio() > 0.f);
180 DCHECK_IMPLIES(direction == SHOWING_CONTROLS, TopControlsShownRatio() < 1.f); 180 DCHECK(direction != SHOWING_CONTROLS || TopControlsShownRatio() < 1.f);
181 181
182 if (top_controls_animation_ && animation_direction_ == direction) 182 if (top_controls_animation_ && animation_direction_ == direction)
183 return; 183 return;
184 184
185 if (!TopControlsHeight()) { 185 if (!TopControlsHeight()) {
186 client_->SetCurrentTopControlsShownRatio( 186 client_->SetCurrentTopControlsShownRatio(
187 direction == HIDING_CONTROLS ? 0.f : 1.f); 187 direction == HIDING_CONTROLS ? 0.f : 1.f);
188 return; 188 return;
189 } 189 }
190 190
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 } 233 }
234 return false; 234 return false;
235 } 235 }
236 236
237 void TopControlsManager::ResetBaseline() { 237 void TopControlsManager::ResetBaseline() {
238 accumulated_scroll_delta_ = 0.f; 238 accumulated_scroll_delta_ = 0.f;
239 baseline_content_offset_ = ContentTopOffset(); 239 baseline_content_offset_ = ContentTopOffset();
240 } 240 }
241 241
242 } // namespace cc 242 } // namespace cc
OLDNEW
« no previous file with comments | « cc/animation/animation_player.cc ('k') | cc/layers/picture_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698