OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_TEST_FAKE_SCROLLBAR_H_ | 5 #ifndef CC_TEST_FAKE_SCROLLBAR_H_ |
6 #define CC_TEST_FAKE_SCROLLBAR_H_ | 6 #define CC_TEST_FAKE_SCROLLBAR_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "cc/input/scrollbar.h" | 10 #include "cc/input/scrollbar.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 bool IsOverlay() const override; | 30 bool IsOverlay() const override; |
31 bool HasThumb() const override; | 31 bool HasThumb() const override; |
32 int ThumbThickness() const override; | 32 int ThumbThickness() const override; |
33 int ThumbLength() const override; | 33 int ThumbLength() const override; |
34 gfx::Rect TrackRect() const override; | 34 gfx::Rect TrackRect() const override; |
35 float ThumbOpacity() const override; | 35 float ThumbOpacity() const override; |
36 bool NeedsPaintPart(ScrollbarPart part) const override; | 36 bool NeedsPaintPart(ScrollbarPart part) const override; |
37 void PaintPart(PaintCanvas* canvas, | 37 void PaintPart(PaintCanvas* canvas, |
38 ScrollbarPart part, | 38 ScrollbarPart part, |
39 const gfx::Rect& content_rect) override; | 39 const gfx::Rect& content_rect) override; |
| 40 bool UsesNinePatchThumbResource() const override; |
| 41 gfx::Size NinePatchThumbCanvasSize() const override; |
| 42 gfx::Rect NinePatchThumbAperture() const override; |
40 | 43 |
41 void set_location(const gfx::Point& location) { location_ = location; } | 44 void set_location(const gfx::Point& location) { location_ = location; } |
42 void set_track_rect(const gfx::Rect& track_rect) { track_rect_ = track_rect; } | 45 void set_track_rect(const gfx::Rect& track_rect) { track_rect_ = track_rect; } |
43 void set_thumb_thickness(int thumb_thickness) { | 46 void set_thumb_thickness(int thumb_thickness) { |
44 thumb_thickness_ = thumb_thickness; | 47 thumb_thickness_ = thumb_thickness; |
45 } | 48 } |
46 void set_thumb_length(int thumb_length) { thumb_length_ = thumb_length; } | 49 void set_thumb_length(int thumb_length) { thumb_length_ = thumb_length; } |
47 void set_has_thumb(bool has_thumb) { has_thumb_ = has_thumb; } | 50 void set_has_thumb(bool has_thumb) { has_thumb_ = has_thumb; } |
48 SkColor paint_fill_color() const { return SK_ColorBLACK | fill_color_; } | 51 SkColor paint_fill_color() const { return SK_ColorBLACK | fill_color_; } |
49 | 52 |
(...skipping 19 matching lines...) Expand all Loading... |
69 gfx::Point location_; | 72 gfx::Point location_; |
70 gfx::Rect track_rect_; | 73 gfx::Rect track_rect_; |
71 SkColor fill_color_; | 74 SkColor fill_color_; |
72 | 75 |
73 DISALLOW_COPY_AND_ASSIGN(FakeScrollbar); | 76 DISALLOW_COPY_AND_ASSIGN(FakeScrollbar); |
74 }; | 77 }; |
75 | 78 |
76 } // namespace cc | 79 } // namespace cc |
77 | 80 |
78 #endif // CC_TEST_FAKE_SCROLLBAR_H_ | 81 #endif // CC_TEST_FAKE_SCROLLBAR_H_ |
OLD | NEW |