OLD | NEW |
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 #include "cc/test/fake_scrollbar.h" | 5 #include "cc/test/fake_scrollbar.h" |
6 | 6 |
7 #include "third_party/skia/include/core/SkCanvas.h" | 7 #include "third_party/skia/include/core/SkCanvas.h" |
8 | 8 |
9 namespace cc { | 9 namespace cc { |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 int FakeScrollbar::ThumbLength() const { | 49 int FakeScrollbar::ThumbLength() const { |
50 return thumb_length_; | 50 return thumb_length_; |
51 } | 51 } |
52 | 52 |
53 gfx::Rect FakeScrollbar::TrackRect() const { | 53 gfx::Rect FakeScrollbar::TrackRect() const { |
54 return track_rect_; | 54 return track_rect_; |
55 } | 55 } |
56 | 56 |
57 void FakeScrollbar::PaintPart(SkCanvas* canvas, | 57 void FakeScrollbar::PaintPart(SkCanvas* canvas, |
58 ScrollbarPart part, | 58 ScrollbarPart part, |
59 gfx::Rect content_rect) { | 59 const gfx::Rect& content_rect) { |
60 if (!paint_) | 60 if (!paint_) |
61 return; | 61 return; |
62 | 62 |
63 // Fill the scrollbar with a different color each time. | 63 // Fill the scrollbar with a different color each time. |
64 fill_color_++; | 64 fill_color_++; |
65 canvas->clear(SK_ColorBLACK | fill_color_); | 65 canvas->clear(SK_ColorBLACK | fill_color_); |
66 } | 66 } |
67 | 67 |
68 } // namespace cc | 68 } // namespace cc |
OLD | NEW |