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

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

Issue 1783613004: CC Animation: Erase cc::LayerSettings everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseandroid
Patch Set: Rebase. Created 4 years, 9 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/solid_color_layer_impl_unittest.cc ('k') | cc/layers/solid_color_scrollbar_layer.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_SOLID_COLOR_SCROLLBAR_LAYER_H_ 5 #ifndef CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_
6 #define CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_ 6 #define CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_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/layers/layer.h" 10 #include "cc/layers/layer.h"
11 #include "cc/layers/scrollbar_layer_interface.h" 11 #include "cc/layers/scrollbar_layer_interface.h"
12 12
13 namespace cc { 13 namespace cc {
14 14
15 class CC_EXPORT SolidColorScrollbarLayer : public ScrollbarLayerInterface, 15 class CC_EXPORT SolidColorScrollbarLayer : public ScrollbarLayerInterface,
16 public Layer { 16 public Layer {
17 public: 17 public:
18 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; 18 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
19 19
20 static scoped_refptr<SolidColorScrollbarLayer> Create( 20 static scoped_refptr<SolidColorScrollbarLayer> Create(
21 const LayerSettings& settings,
22 ScrollbarOrientation orientation, 21 ScrollbarOrientation orientation,
23 int thumb_thickness, 22 int thumb_thickness,
24 int track_start, 23 int track_start,
25 bool is_left_side_vertical_scrollbar, 24 bool is_left_side_vertical_scrollbar,
26 int scroll_layer_id); 25 int scroll_layer_id);
27 26
28 // Layer overrides. 27 // Layer overrides.
29 bool OpacityCanAnimateOnImplThread() const override; 28 bool OpacityCanAnimateOnImplThread() const override;
30 ScrollbarLayerInterface* ToScrollbarLayer() override; 29 ScrollbarLayerInterface* ToScrollbarLayer() override;
31 30
32 void PushPropertiesTo(LayerImpl* layer) override; 31 void PushPropertiesTo(LayerImpl* layer) override;
33 32
34 void SetNeedsDisplayRect(const gfx::Rect& rect) override; 33 void SetNeedsDisplayRect(const gfx::Rect& rect) override;
35 34
36 // ScrollbarLayerInterface 35 // ScrollbarLayerInterface
37 int ScrollLayerId() const override; 36 int ScrollLayerId() const override;
38 void SetScrollLayer(int layer_id) override; 37 void SetScrollLayer(int layer_id) override;
39 38
40 ScrollbarOrientation orientation() const override; 39 ScrollbarOrientation orientation() const override;
41 40
42 protected: 41 protected:
43 SolidColorScrollbarLayer(const LayerSettings& settings, 42 SolidColorScrollbarLayer(ScrollbarOrientation orientation,
44 ScrollbarOrientation orientation,
45 int thumb_thickness, 43 int thumb_thickness,
46 int track_start, 44 int track_start,
47 bool is_left_side_vertical_scrollbar, 45 bool is_left_side_vertical_scrollbar,
48 int scroll_layer_id); 46 int scroll_layer_id);
49 ~SolidColorScrollbarLayer() override; 47 ~SolidColorScrollbarLayer() override;
50 48
51 private: 49 private:
52 int scroll_layer_id_; 50 int scroll_layer_id_;
53 ScrollbarOrientation orientation_; 51 ScrollbarOrientation orientation_;
54 int thumb_thickness_; 52 int thumb_thickness_;
55 int track_start_; 53 int track_start_;
56 bool is_left_side_vertical_scrollbar_; 54 bool is_left_side_vertical_scrollbar_;
57 55
58 DISALLOW_COPY_AND_ASSIGN(SolidColorScrollbarLayer); 56 DISALLOW_COPY_AND_ASSIGN(SolidColorScrollbarLayer);
59 }; 57 };
60 58
61 } // namespace cc 59 } // namespace cc
62 60
63 #endif // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_ 61 #endif // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_
OLDNEW
« no previous file with comments | « cc/layers/solid_color_layer_impl_unittest.cc ('k') | cc/layers/solid_color_scrollbar_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698