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

Side by Side Diff: cc/test/fake_scrollbar.h

Issue 2591863003: Use nine-patch resource for drawing Aura overlay scrollbar thumb. (Closed)
Patch Set: Move CheckGeometryLimitations back to where it used to be (AppendQuads) Created 3 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/test/data/overlay_scrollbar_scaled_up.png ('k') | cc/test/fake_scrollbar.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 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
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
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_
OLDNEW
« no previous file with comments | « cc/test/data/overlay_scrollbar_scaled_up.png ('k') | cc/test/fake_scrollbar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698