| 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 30 matching lines...) Expand all Loading... |
| 54 return thumb_thickness_scale_factor_; | 55 return thumb_thickness_scale_factor_; |
| 55 } | 56 } |
| 56 bool SetThumbThicknessScaleFactor(float thumb_thickness_scale_factor); | 57 bool SetThumbThicknessScaleFactor(float thumb_thickness_scale_factor); |
| 57 | 58 |
| 58 virtual int ThumbThickness() const = 0; | 59 virtual int ThumbThickness() const = 0; |
| 59 | 60 |
| 60 // TODO(crbug.com/702832): No need for this function once there is element id | 61 // TODO(crbug.com/702832): No need for this function once there is element id |
| 61 // on overlay scrollbar layers. | 62 // on overlay scrollbar layers. |
| 62 void SetOverlayScrollbarLayerOpacityAnimated(float opacity); | 63 void SetOverlayScrollbarLayerOpacityAnimated(float opacity); |
| 63 | 64 |
| 65 virtual LayerTreeSettings::ScrollbarAnimator GetScrollbarAnimator() const; |
| 66 |
| 64 protected: | 67 protected: |
| 65 ScrollbarLayerImplBase(LayerTreeImpl* tree_impl, | 68 ScrollbarLayerImplBase(LayerTreeImpl* tree_impl, |
| 66 int id, | 69 int id, |
| 67 ScrollbarOrientation orientation, | 70 ScrollbarOrientation orientation, |
| 68 bool is_left_side_vertical_scrollbar, | 71 bool is_left_side_vertical_scrollbar, |
| 69 bool is_overlay); | 72 bool is_overlay); |
| 70 ~ScrollbarLayerImplBase() override; | 73 ~ScrollbarLayerImplBase() override; |
| 71 | 74 |
| 72 virtual int ThumbLength() const = 0; | 75 virtual int ThumbLength() const = 0; |
| 73 virtual float TrackLength() const = 0; | 76 virtual float TrackLength() const = 0; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 95 float vertical_adjust_; | 98 float vertical_adjust_; |
| 96 | 99 |
| 97 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase); | 100 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase); |
| 98 }; | 101 }; |
| 99 | 102 |
| 100 using ScrollbarSet = base::flat_set<ScrollbarLayerImplBase*>; | 103 using ScrollbarSet = base::flat_set<ScrollbarLayerImplBase*>; |
| 101 | 104 |
| 102 } // namespace cc | 105 } // namespace cc |
| 103 | 106 |
| 104 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ | 107 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ |
| OLD | NEW |