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

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

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_LAYERS_PAINTED_SCROLLBAR_LAYER_IMPL_H_
6 #define CC_LAYERS_PAINTED_SCROLLBAR_LAYER_IMPL_H_
7
8 #include "cc/base/cc_export.h"
9 #include "cc/input/scrollbar.h"
10 #include "cc/layers/scrollbar_layer_impl_base.h"
11 #include "cc/resources/ui_resource_client.h"
12
13 namespace cc {
14
15 class LayerTreeImpl;
16 class ScrollView;
17
18 class CC_EXPORT PaintedScrollbarLayerImpl : public ScrollbarLayerImplBase {
19 public:
20 static scoped_ptr<PaintedScrollbarLayerImpl> Create(
21 LayerTreeImpl* tree_impl,
22 int id,
23 ScrollbarOrientation orientation);
24 ~PaintedScrollbarLayerImpl() override;
25
26 // LayerImpl implementation.
27 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
28 void PushPropertiesTo(LayerImpl* layer) override;
29
30 bool WillDraw(DrawMode draw_mode,
31 ResourceProvider* resource_provider) override;
32 void AppendQuads(RenderPass* render_pass,
33 AppendQuadsData* append_quads_data) override;
34 gfx::Rect GetEnclosingRectInTargetSpace() const override;
35
36 void SetThumbThickness(int thumb_thickness);
37 void SetThumbLength(int thumb_length);
38 void SetTrackStart(int track_start);
39 void SetTrackLength(int track_length);
40
41 void set_track_ui_resource_id(UIResourceId uid) {
42 track_ui_resource_id_ = uid;
43 }
44 void set_thumb_ui_resource_id(UIResourceId uid) {
45 thumb_ui_resource_id_ = uid;
46 }
47
48 void set_internal_contents_scale_and_bounds(float content_scale,
49 const gfx::Size& content_bounds) {
50 internal_contents_scale_ = content_scale;
51 internal_content_bounds_ = content_bounds;
52 }
53
54 protected:
55 PaintedScrollbarLayerImpl(LayerTreeImpl* tree_impl,
56 int id,
57 ScrollbarOrientation orientation);
58
59 // ScrollbarLayerImplBase implementation.
60 int ThumbThickness() const override;
61 int ThumbLength() const override;
62 float TrackLength() const override;
63 int TrackStart() const override;
64 bool IsThumbResizable() const override;
65
66 private:
67 const char* LayerTypeAsString() const override;
68
69 UIResourceId track_ui_resource_id_;
70 UIResourceId thumb_ui_resource_id_;
71
72 float internal_contents_scale_;
73 gfx::Size internal_content_bounds_;
74
75 int thumb_thickness_;
76 int thumb_length_;
77 int track_start_;
78 int track_length_;
79
80 DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayerImpl);
81 };
82
83 } // namespace cc
84 #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