| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "cc/cc_export.h" | 9 #include "cc/cc_export.h" |
| 10 #include "cc/input/scrollbar.h" | 10 #include "cc/input/scrollbar.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // Thumb quad rect in layer space. | 49 // Thumb quad rect in layer space. |
| 50 virtual gfx::Rect ComputeThumbQuadRect() const; | 50 virtual gfx::Rect ComputeThumbQuadRect() const; |
| 51 | 51 |
| 52 float thumb_thickness_scale_factor() { | 52 float thumb_thickness_scale_factor() { |
| 53 return thumb_thickness_scale_factor_; | 53 return thumb_thickness_scale_factor_; |
| 54 } | 54 } |
| 55 bool SetThumbThicknessScaleFactor(float thumb_thickness_scale_factor); | 55 bool SetThumbThicknessScaleFactor(float thumb_thickness_scale_factor); |
| 56 | 56 |
| 57 virtual int ThumbThickness() const = 0; | 57 virtual int ThumbThickness() const = 0; |
| 58 | 58 |
| 59 // TODO(crbug.com/702832): No need for this function once there is element id |
| 60 // on overlay scrollbar layers. |
| 61 void SetOverlayScrollbarLayerOpacityAnimated(float opacity); |
| 62 |
| 59 protected: | 63 protected: |
| 60 ScrollbarLayerImplBase(LayerTreeImpl* tree_impl, | 64 ScrollbarLayerImplBase(LayerTreeImpl* tree_impl, |
| 61 int id, | 65 int id, |
| 62 ScrollbarOrientation orientation, | 66 ScrollbarOrientation orientation, |
| 63 bool is_left_side_vertical_scrollbar, | 67 bool is_left_side_vertical_scrollbar, |
| 64 bool is_overlay); | 68 bool is_overlay); |
| 65 ~ScrollbarLayerImplBase() override; | 69 ~ScrollbarLayerImplBase() override; |
| 66 | 70 |
| 67 virtual int ThumbLength() const = 0; | 71 virtual int ThumbLength() const = 0; |
| 68 virtual float TrackLength() const = 0; | 72 virtual float TrackLength() const = 0; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 87 float vertical_adjust_; | 91 float vertical_adjust_; |
| 88 | 92 |
| 89 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase); | 93 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase); |
| 90 }; | 94 }; |
| 91 | 95 |
| 92 typedef std::set<ScrollbarLayerImplBase*> ScrollbarSet; | 96 typedef std::set<ScrollbarLayerImplBase*> ScrollbarSet; |
| 93 | 97 |
| 94 } // namespace cc | 98 } // namespace cc |
| 95 | 99 |
| 96 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ | 100 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ |
| OLD | NEW |