Chromium Code Reviews| 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" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 return thumb_thickness_scale_factor_; | 54 return thumb_thickness_scale_factor_; |
| 55 } | 55 } |
| 56 bool SetThumbThicknessScaleFactor(float thumb_thickness_scale_factor); | 56 bool SetThumbThicknessScaleFactor(float thumb_thickness_scale_factor); |
| 57 | 57 |
| 58 virtual int ThumbThickness() const = 0; | 58 virtual int ThumbThickness() const = 0; |
| 59 | 59 |
| 60 // TODO(crbug.com/702832): No need for this function once there is element id | 60 // TODO(crbug.com/702832): No need for this function once there is element id |
| 61 // on overlay scrollbar layers. | 61 // on overlay scrollbar layers. |
| 62 void SetOverlayScrollbarLayerOpacityAnimated(float opacity); | 62 void SetOverlayScrollbarLayerOpacityAnimated(float opacity); |
| 63 | 63 |
| 64 virtual bool IsSolidColorScrollbarLayerImpl() const; | |
|
aelias_OOO_until_Jul13
2017/06/02 22:02:23
How about instead making scrollbars return one of
chaopeng
2017/06/05 14:52:39
Yes, this would be better.
| |
| 65 | |
| 64 protected: | 66 protected: |
| 65 ScrollbarLayerImplBase(LayerTreeImpl* tree_impl, | 67 ScrollbarLayerImplBase(LayerTreeImpl* tree_impl, |
| 66 int id, | 68 int id, |
| 67 ScrollbarOrientation orientation, | 69 ScrollbarOrientation orientation, |
| 68 bool is_left_side_vertical_scrollbar, | 70 bool is_left_side_vertical_scrollbar, |
| 69 bool is_overlay); | 71 bool is_overlay); |
| 70 ~ScrollbarLayerImplBase() override; | 72 ~ScrollbarLayerImplBase() override; |
| 71 | 73 |
| 72 virtual int ThumbLength() const = 0; | 74 virtual int ThumbLength() const = 0; |
| 73 virtual float TrackLength() const = 0; | 75 virtual float TrackLength() const = 0; |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 95 float vertical_adjust_; | 97 float vertical_adjust_; |
| 96 | 98 |
| 97 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase); | 99 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase); |
| 98 }; | 100 }; |
| 99 | 101 |
| 100 using ScrollbarSet = base::flat_set<ScrollbarLayerImplBase*>; | 102 using ScrollbarSet = base::flat_set<ScrollbarLayerImplBase*>; |
| 101 | 103 |
| 102 } // namespace cc | 104 } // namespace cc |
| 103 | 105 |
| 104 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ | 106 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ |
| OLD | NEW |