Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Side by Side Diff: cc/layers/scrollbar_layer_impl_base.h

Issue 2918753002: Prevent create ScrollbarAnimationController for Mac Overlay Scrollbar (Closed)
Patch Set: fix without MACOSX macro Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/painted_scrollbar_layer_impl.cc ('k') | cc/layers/scrollbar_layer_impl_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « cc/layers/painted_scrollbar_layer_impl.cc ('k') | cc/layers/scrollbar_layer_impl_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698