| OLD | NEW |
| 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 #ifndef CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ | 5 #ifndef CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ |
| 6 #define CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ | 6 #define CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ |
| 7 | 7 |
| 8 #include "base/containers/flat_set.h" | 8 #include "base/containers/flat_set.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "cc/cc_export.h" | 10 #include "cc/cc_export.h" |
| 11 #include "cc/input/scrollbar.h" | 11 #include "cc/input/scrollbar.h" |
| 12 #include "cc/layers/layer.h" | 12 #include "cc/layers/layer.h" |
| 13 #include "cc/layers/layer_impl.h" | 13 #include "cc/layers/layer_impl.h" |
| 14 #include "cc/trees/layer_tree_settings.h" |
| 14 | 15 |
| 15 namespace cc { | 16 namespace cc { |
| 16 | 17 |
| 17 class LayerTreeImpl; | 18 class LayerTreeImpl; |
| 18 | 19 |
| 19 class CC_EXPORT ScrollbarLayerImplBase : public LayerImpl { | 20 class CC_EXPORT ScrollbarLayerImplBase : public LayerImpl { |
| 20 public: | 21 public: |
| 21 ElementId scroll_element_id() const { return scroll_element_id_; } | 22 ElementId scroll_element_id() const { return scroll_element_id_; } |
| 22 void SetScrollElementId(ElementId scroll_element_id); | 23 void SetScrollElementId(ElementId scroll_element_id); |
| 23 | 24 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 return thumb_thickness_scale_factor_; | 57 return thumb_thickness_scale_factor_; |
| 57 } | 58 } |
| 58 void SetThumbThicknessScaleFactor(float thumb_thickness_scale_factor); | 59 void SetThumbThicknessScaleFactor(float thumb_thickness_scale_factor); |
| 59 | 60 |
| 60 virtual int ThumbThickness() const = 0; | 61 virtual int ThumbThickness() const = 0; |
| 61 | 62 |
| 62 // TODO(crbug.com/702832): No need for this function once there is element id | 63 // TODO(crbug.com/702832): No need for this function once there is element id |
| 63 // on overlay scrollbar layers. | 64 // on overlay scrollbar layers. |
| 64 void SetOverlayScrollbarLayerOpacityAnimated(float opacity); | 65 void SetOverlayScrollbarLayerOpacityAnimated(float opacity); |
| 65 | 66 |
| 67 virtual LayerTreeSettings::ScrollbarAnimator GetScrollbarAnimator() const; |
| 68 |
| 66 protected: | 69 protected: |
| 67 ScrollbarLayerImplBase(LayerTreeImpl* tree_impl, | 70 ScrollbarLayerImplBase(LayerTreeImpl* tree_impl, |
| 68 int id, | 71 int id, |
| 69 ScrollbarOrientation orientation, | 72 ScrollbarOrientation orientation, |
| 70 bool is_left_side_vertical_scrollbar, | 73 bool is_left_side_vertical_scrollbar, |
| 71 bool is_overlay); | 74 bool is_overlay); |
| 72 ~ScrollbarLayerImplBase() override; | 75 ~ScrollbarLayerImplBase() override; |
| 73 | 76 |
| 74 virtual int ThumbLength() const = 0; | 77 virtual int ThumbLength() const = 0; |
| 75 virtual float TrackLength() const = 0; | 78 virtual float TrackLength() const = 0; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 97 float vertical_adjust_; | 100 float vertical_adjust_; |
| 98 | 101 |
| 99 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase); | 102 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase); |
| 100 }; | 103 }; |
| 101 | 104 |
| 102 using ScrollbarSet = base::flat_set<ScrollbarLayerImplBase*>; | 105 using ScrollbarSet = base::flat_set<ScrollbarLayerImplBase*>; |
| 103 | 106 |
| 104 } // namespace cc | 107 } // namespace cc |
| 105 | 108 |
| 106 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ | 109 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ |
| OLD | NEW |