| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 3657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3668 } | 3668 } |
| 3669 return str; | 3669 return str; |
| 3670 } | 3670 } |
| 3671 | 3671 |
| 3672 void LayerTreeHostImpl::RegisterScrollbarAnimationController( | 3672 void LayerTreeHostImpl::RegisterScrollbarAnimationController( |
| 3673 ElementId scroll_element_id) { | 3673 ElementId scroll_element_id) { |
| 3674 if (settings().scrollbar_animator == LayerTreeSettings::NO_ANIMATOR) | 3674 if (settings().scrollbar_animator == LayerTreeSettings::NO_ANIMATOR) |
| 3675 return; | 3675 return; |
| 3676 if (ScrollbarAnimationControllerForElementId(scroll_element_id)) | 3676 if (ScrollbarAnimationControllerForElementId(scroll_element_id)) |
| 3677 return; | 3677 return; |
| 3678 |
| 3678 scrollbar_animation_controllers_[scroll_element_id] = | 3679 scrollbar_animation_controllers_[scroll_element_id] = |
| 3679 active_tree_->CreateScrollbarAnimationController(scroll_element_id); | 3680 active_tree_->CreateScrollbarAnimationController(scroll_element_id); |
| 3680 } | 3681 } |
| 3681 | 3682 |
| 3682 void LayerTreeHostImpl::UnregisterScrollbarAnimationController( | 3683 void LayerTreeHostImpl::UnregisterScrollbarAnimationController( |
| 3683 ElementId scroll_element_id) { | 3684 ElementId scroll_element_id) { |
| 3684 scrollbar_animation_controllers_.erase(scroll_element_id); | 3685 scrollbar_animation_controllers_.erase(scroll_element_id); |
| 3685 } | 3686 } |
| 3686 | 3687 |
| 3687 ScrollbarAnimationController* | 3688 ScrollbarAnimationController* |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4270 } | 4271 } |
| 4271 | 4272 |
| 4272 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) { | 4273 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) { |
| 4273 if (is_wheel_scroll) | 4274 if (is_wheel_scroll) |
| 4274 has_scrolled_by_wheel_ = true; | 4275 has_scrolled_by_wheel_ = true; |
| 4275 else | 4276 else |
| 4276 has_scrolled_by_touch_ = true; | 4277 has_scrolled_by_touch_ = true; |
| 4277 } | 4278 } |
| 4278 | 4279 |
| 4279 } // namespace cc | 4280 } // namespace cc |
| OLD | NEW |