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

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

Issue 2468423004: Left side vertical MD scrollbars grow toward right. (Closed)
Patch Set: Created 4 years, 1 month 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.cc ('k') | cc/layers/painted_scrollbar_layer_impl.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_PAINTED_SCROLLBAR_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_PAINTED_SCROLLBAR_LAYER_IMPL_H_
6 #define CC_LAYERS_PAINTED_SCROLLBAR_LAYER_IMPL_H_ 6 #define CC_LAYERS_PAINTED_SCROLLBAR_LAYER_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "cc/input/scrollbar.h" 10 #include "cc/input/scrollbar.h"
11 #include "cc/layers/scrollbar_layer_impl_base.h" 11 #include "cc/layers/scrollbar_layer_impl_base.h"
12 #include "cc/resources/ui_resource_client.h" 12 #include "cc/resources/ui_resource_client.h"
13 13
14 namespace cc { 14 namespace cc {
15 15
16 class LayerTreeImpl; 16 class LayerTreeImpl;
17 class ScrollView; 17 class ScrollView;
18 18
19 class CC_EXPORT PaintedScrollbarLayerImpl : public ScrollbarLayerImplBase { 19 class CC_EXPORT PaintedScrollbarLayerImpl : public ScrollbarLayerImplBase {
20 public: 20 public:
21 static std::unique_ptr<PaintedScrollbarLayerImpl> 21 static std::unique_ptr<PaintedScrollbarLayerImpl> Create(
22 Create(LayerTreeImpl* tree_impl, int id, ScrollbarOrientation orientation); 22 LayerTreeImpl* tree_impl,
23 int id,
24 ScrollbarOrientation orientation,
25 bool is_left_side_vertical_scrollbar,
26 bool is_overlay);
23 ~PaintedScrollbarLayerImpl() override; 27 ~PaintedScrollbarLayerImpl() override;
24 28
25 // LayerImpl implementation. 29 // LayerImpl implementation.
26 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; 30 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
27 void PushPropertiesTo(LayerImpl* layer) override; 31 void PushPropertiesTo(LayerImpl* layer) override;
28 32
29 bool WillDraw(DrawMode draw_mode, 33 bool WillDraw(DrawMode draw_mode,
30 ResourceProvider* resource_provider) override; 34 ResourceProvider* resource_provider) override;
31 void AppendQuads(RenderPass* render_pass, 35 void AppendQuads(RenderPass* render_pass,
32 AppendQuadsData* append_quads_data) override; 36 AppendQuadsData* append_quads_data) override;
(...skipping 15 matching lines...) Expand all
48 52
49 void set_internal_contents_scale_and_bounds(float content_scale, 53 void set_internal_contents_scale_and_bounds(float content_scale,
50 const gfx::Size& content_bounds) { 54 const gfx::Size& content_bounds) {
51 internal_contents_scale_ = content_scale; 55 internal_contents_scale_ = content_scale;
52 internal_content_bounds_ = content_bounds; 56 internal_content_bounds_ = content_bounds;
53 } 57 }
54 58
55 protected: 59 protected:
56 PaintedScrollbarLayerImpl(LayerTreeImpl* tree_impl, 60 PaintedScrollbarLayerImpl(LayerTreeImpl* tree_impl,
57 int id, 61 int id,
58 ScrollbarOrientation orientation); 62 ScrollbarOrientation orientation,
63 bool is_left_side_vertical_scrollbar,
64 bool is_overlay);
59 65
60 // ScrollbarLayerImplBase implementation. 66 // ScrollbarLayerImplBase implementation.
61 int ThumbThickness() const override; 67 int ThumbThickness() const override;
62 int ThumbLength() const override; 68 int ThumbLength() const override;
63 float TrackLength() const override; 69 float TrackLength() const override;
64 int TrackStart() const override; 70 int TrackStart() const override;
65 bool IsThumbResizable() const override; 71 bool IsThumbResizable() const override;
66 72
67 private: 73 private:
68 const char* LayerTypeAsString() const override; 74 const char* LayerTypeAsString() const override;
69 75
70 UIResourceId track_ui_resource_id_; 76 UIResourceId track_ui_resource_id_;
71 UIResourceId thumb_ui_resource_id_; 77 UIResourceId thumb_ui_resource_id_;
72 78
73 float thumb_opacity_; 79 float thumb_opacity_;
74 80
75 float internal_contents_scale_; 81 float internal_contents_scale_;
76 gfx::Size internal_content_bounds_; 82 gfx::Size internal_content_bounds_;
77 83
78 int thumb_thickness_; 84 int thumb_thickness_;
79 int thumb_length_; 85 int thumb_length_;
80 int track_start_; 86 int track_start_;
81 int track_length_; 87 int track_length_;
82 88
83 DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayerImpl); 89 DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayerImpl);
84 }; 90 };
85 91
86 } // namespace cc 92 } // namespace cc
87 #endif // CC_LAYERS_PAINTED_SCROLLBAR_LAYER_IMPL_H_ 93 #endif // CC_LAYERS_PAINTED_SCROLLBAR_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/painted_scrollbar_layer.cc ('k') | cc/layers/painted_scrollbar_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698