| OLD | NEW |
| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 } | 236 } |
| 237 | 237 |
| 238 void ScrollbarAnimationController::DidMouseLeave() { | 238 void ScrollbarAnimationController::DidMouseLeave() { |
| 239 if (!need_thinning_animation_) | 239 if (!need_thinning_animation_) |
| 240 return; | 240 return; |
| 241 | 241 |
| 242 vertical_controller_->DidMouseLeave(); | 242 vertical_controller_->DidMouseLeave(); |
| 243 horizontal_controller_->DidMouseLeave(); | 243 horizontal_controller_->DidMouseLeave(); |
| 244 | 244 |
| 245 delayed_scrollbar_show_.Cancel(); | 245 delayed_scrollbar_show_.Cancel(); |
| 246 need_trigger_scrollbar_show_ = false; |
| 246 | 247 |
| 247 if (ScrollbarsHidden() || Captured()) | 248 if (ScrollbarsHidden() || Captured()) |
| 248 return; | 249 return; |
| 249 | 250 |
| 250 PostDelayedFadeOut(false); | 251 PostDelayedFadeOut(false); |
| 251 } | 252 } |
| 252 | 253 |
| 253 void ScrollbarAnimationController::DidMouseMoveNear( | 254 void ScrollbarAnimationController::DidMouseMoveNear( |
| 254 ScrollbarOrientation orientation, | 255 ScrollbarOrientation orientation, |
| 255 float distance) { | 256 float distance) { |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 if (opacity_ != opacity) | 367 if (opacity_ != opacity) |
| 367 client_->SetNeedsRedrawForScrollbarAnimation(); | 368 client_->SetNeedsRedrawForScrollbarAnimation(); |
| 368 | 369 |
| 369 opacity_ = opacity; | 370 opacity_ = opacity; |
| 370 | 371 |
| 371 if (previouslyVisible != currentlyVisible) | 372 if (previouslyVisible != currentlyVisible) |
| 372 client_->DidChangeScrollbarVisibility(); | 373 client_->DidChangeScrollbarVisibility(); |
| 373 } | 374 } |
| 374 | 375 |
| 375 } // namespace cc | 376 } // namespace cc |
| OLD | NEW |