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

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

Issue 2834393003: Re-enable ScrollbarAnimationController::DidRequestShowFromMainThread. (Closed)
Patch Set: remove Android hacks Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "cc/input/scrollbar_animation_controller.h" 5 #include "cc/input/scrollbar_animation_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "cc/trees/layer_tree_impl.h" 10 #include "cc/trees/layer_tree_impl.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 horizontal_controller_->UpdateThumbThicknessScale(); 223 horizontal_controller_->UpdateThumbThicknessScale();
224 } 224 }
225 } 225 }
226 226
227 void ScrollbarAnimationController::WillUpdateScroll() { 227 void ScrollbarAnimationController::WillUpdateScroll() {
228 if (show_scrollbars_on_scroll_gesture_) 228 if (show_scrollbars_on_scroll_gesture_)
229 DidScrollUpdate(); 229 DidScrollUpdate();
230 } 230 }
231 231
232 void ScrollbarAnimationController::DidRequestShowFromMainThread() { 232 void ScrollbarAnimationController::DidRequestShowFromMainThread() {
233 // TODO(skobes): Call DidScrollUpdate here (suppressed for crbug.com/706927). 233 DidScrollUpdate();
234 } 234 }
235 235
236 void ScrollbarAnimationController::DidResize() { 236 void ScrollbarAnimationController::DidResize() {
237 StopAnimation(); 237 StopAnimation();
238 Show(); 238 Show();
239 239
240 // As an optimization, we avoid spamming fade delay tasks during active fast 240 // As an optimization, we avoid spamming fade delay tasks during active fast
241 // scrolls. 241 // scrolls.
242 if (!currently_scrolling_) { 242 if (!currently_scrolling_) {
243 PostDelayedAnimation(FADE_OUT, true); 243 PostDelayedAnimation(FADE_OUT, true);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 if (opacity_ != opacity) 381 if (opacity_ != opacity)
382 client_->SetNeedsRedrawForScrollbarAnimation(); 382 client_->SetNeedsRedrawForScrollbarAnimation();
383 383
384 opacity_ = opacity; 384 opacity_ = opacity;
385 385
386 if (previouslyVisible != currentlyVisible) 386 if (previouslyVisible != currentlyVisible)
387 client_->DidChangeScrollbarVisibility(); 387 client_->DidChangeScrollbarVisibility();
388 } 388 }
389 389
390 } // namespace cc 390 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698