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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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.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 "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/scrollbar_layer_impl_base.h" 10 #include "cc/layers/scrollbar_layer_impl_base.h"
(...skipping 12 matching lines...) Expand all
23 ScrollbarOrientation orientation); 23 ScrollbarOrientation orientation);
24 ~PaintedScrollbarLayerImpl() override; 24 ~PaintedScrollbarLayerImpl() override;
25 25
26 // LayerImpl implementation. 26 // LayerImpl implementation.
27 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; 27 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
28 void PushPropertiesTo(LayerImpl* layer) override; 28 void PushPropertiesTo(LayerImpl* layer) override;
29 29
30 bool WillDraw(DrawMode draw_mode, 30 bool WillDraw(DrawMode draw_mode,
31 ResourceProvider* resource_provider) override; 31 ResourceProvider* resource_provider) override;
32 void AppendQuads(RenderPass* render_pass, 32 void AppendQuads(RenderPass* render_pass,
33 const Occlusion& occlusion_in_content_space,
34 AppendQuadsData* append_quads_data) override; 33 AppendQuadsData* append_quads_data) override;
35 34
36 void SetThumbThickness(int thumb_thickness); 35 void SetThumbThickness(int thumb_thickness);
37 void SetThumbLength(int thumb_length); 36 void SetThumbLength(int thumb_length);
38 void SetTrackStart(int track_start); 37 void SetTrackStart(int track_start);
39 void SetTrackLength(int track_length); 38 void SetTrackLength(int track_length);
40 39
41 void set_track_ui_resource_id(UIResourceId uid) { 40 void set_track_ui_resource_id(UIResourceId uid) {
42 track_ui_resource_id_ = uid; 41 track_ui_resource_id_ = uid;
43 } 42 }
44 void set_thumb_ui_resource_id(UIResourceId uid) { 43 void set_thumb_ui_resource_id(UIResourceId uid) {
45 thumb_ui_resource_id_ = uid; 44 thumb_ui_resource_id_ = uid;
46 } 45 }
47 46
47 void set_internal_contents_scale_and_bounds(float content_scale,
48 const gfx::Size& content_bounds) {
49 internal_contents_scale_ = content_scale;
50 internal_content_bounds_ = content_bounds;
51 }
52
48 protected: 53 protected:
49 PaintedScrollbarLayerImpl(LayerTreeImpl* tree_impl, 54 PaintedScrollbarLayerImpl(LayerTreeImpl* tree_impl,
50 int id, 55 int id,
51 ScrollbarOrientation orientation); 56 ScrollbarOrientation orientation);
52 57
53 // ScrollbarLayerImplBase implementation. 58 // ScrollbarLayerImplBase implementation.
54 int ThumbThickness() const override; 59 int ThumbThickness() const override;
55 int ThumbLength() const override; 60 int ThumbLength() const override;
56 float TrackLength() const override; 61 float TrackLength() const override;
57 int TrackStart() const override; 62 int TrackStart() const override;
58 bool IsThumbResizable() const override; 63 bool IsThumbResizable() const override;
59 64
60 private: 65 private:
61 const char* LayerTypeAsString() const override; 66 const char* LayerTypeAsString() const override;
62 67
63 UIResourceId track_ui_resource_id_; 68 UIResourceId track_ui_resource_id_;
64 UIResourceId thumb_ui_resource_id_; 69 UIResourceId thumb_ui_resource_id_;
65 70
71 float internal_contents_scale_;
72 gfx::Size internal_content_bounds_;
73
66 int thumb_thickness_; 74 int thumb_thickness_;
67 int thumb_length_; 75 int thumb_length_;
68 int track_start_; 76 int track_start_;
69 int track_length_; 77 int track_length_;
70 78
71 DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayerImpl); 79 DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayerImpl);
72 }; 80 };
73 81
74 } // namespace cc 82 } // namespace cc
75 #endif // CC_LAYERS_PAINTED_SCROLLBAR_LAYER_IMPL_H_ 83 #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