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

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

Issue 645853008: Standardize usage of virtual/override/final in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatted Created 6 years, 2 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/render_surface_unittest.cc ('k') | cc/layers/scrollbar_layer_unittest.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 "cc/base/cc_export.h" 8 #include "cc/base/cc_export.h"
9 #include "cc/input/scrollbar.h" 9 #include "cc/input/scrollbar.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 28 matching lines...) Expand all
39 is_overlay_scrollbar_ = is_overlay; 39 is_overlay_scrollbar_ = is_overlay;
40 } 40 }
41 41
42 ScrollbarOrientation orientation() const { return orientation_; } 42 ScrollbarOrientation orientation() const { return orientation_; }
43 bool is_left_side_vertical_scrollbar() { 43 bool is_left_side_vertical_scrollbar() {
44 return is_left_side_vertical_scrollbar_; 44 return is_left_side_vertical_scrollbar_;
45 } 45 }
46 46
47 bool CanScrollOrientation() const; 47 bool CanScrollOrientation() const;
48 48
49 virtual void PushPropertiesTo(LayerImpl* layer) override; 49 void PushPropertiesTo(LayerImpl* layer) override;
50 virtual ScrollbarLayerImplBase* ToScrollbarLayer() override; 50 ScrollbarLayerImplBase* ToScrollbarLayer() override;
51 void PushScrollClipPropertiesTo(LayerImpl* layer); 51 void PushScrollClipPropertiesTo(LayerImpl* layer);
52 52
53 bool SetVisibleToTotalLengthRatio(float ratio); 53 bool SetVisibleToTotalLengthRatio(float ratio);
54 virtual gfx::Rect ComputeThumbQuadRect() const; 54 virtual gfx::Rect ComputeThumbQuadRect() const;
55 55
56 float thumb_thickness_scale_factor() { 56 float thumb_thickness_scale_factor() {
57 return thumb_thickness_scale_factor_; 57 return thumb_thickness_scale_factor_;
58 } 58 }
59 bool SetThumbThicknessScaleFactor(float thumb_thickness_scale_factor); 59 bool SetThumbThicknessScaleFactor(float thumb_thickness_scale_factor);
60 60
61 void ScrollbarParametersDidChange(bool on_resize); 61 void ScrollbarParametersDidChange(bool on_resize);
62 62
63 protected: 63 protected:
64 ScrollbarLayerImplBase(LayerTreeImpl* tree_impl, 64 ScrollbarLayerImplBase(LayerTreeImpl* tree_impl,
65 int id, 65 int id,
66 ScrollbarOrientation orientation, 66 ScrollbarOrientation orientation,
67 bool is_left_side_vertical_scrollbar, 67 bool is_left_side_vertical_scrollbar,
68 bool is_overlay); 68 bool is_overlay);
69 virtual ~ScrollbarLayerImplBase(); 69 ~ScrollbarLayerImplBase() override;
70 70
71 gfx::Rect ScrollbarLayerRectToContentRect(const gfx::RectF& layer_rect) const; 71 gfx::Rect ScrollbarLayerRectToContentRect(const gfx::RectF& layer_rect) const;
72 72
73 float visible_to_total_length_ratio() const { 73 float visible_to_total_length_ratio() const {
74 return visible_to_total_length_ratio_; 74 return visible_to_total_length_ratio_;
75 } 75 }
76 float vertical_adjust() const { return vertical_adjust_; } 76 float vertical_adjust() const { return vertical_adjust_; }
77 77
78 virtual int ThumbThickness() const = 0; 78 virtual int ThumbThickness() const = 0;
79 virtual int ThumbLength() const = 0; 79 virtual int ThumbLength() const = 0;
(...skipping 19 matching lines...) Expand all
99 float vertical_adjust_; 99 float vertical_adjust_;
100 100
101 float visible_to_total_length_ratio_; 101 float visible_to_total_length_ratio_;
102 102
103 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase); 103 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImplBase);
104 }; 104 };
105 105
106 } // namespace cc 106 } // namespace cc
107 107
108 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ 108 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_
OLDNEW
« no previous file with comments | « cc/layers/render_surface_unittest.cc ('k') | cc/layers/scrollbar_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698