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 "cc/paint/paint_flags.h" | 7 #include "cc/paint/paint_flags.h" |
8 #include "ui/gfx/skia_util.h" | 8 #include "ui/gfx/skia_util.h" |
9 | 9 |
10 namespace cc { | 10 namespace cc { |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 flags.setColor(paint_fill_color()); | 84 flags.setColor(paint_fill_color()); |
85 flags.setStyle(PaintFlags::kFill_Style); | 85 flags.setStyle(PaintFlags::kFill_Style); |
86 | 86 |
87 // Emulate the how the real scrollbar works by using scrollbar's rect for | 87 // Emulate the how the real scrollbar works by using scrollbar's rect for |
88 // TRACK and the given content_rect for the THUMB | 88 // TRACK and the given content_rect for the THUMB |
89 SkRect rect = part == TRACK ? RectToSkRect(TrackRect()) | 89 SkRect rect = part == TRACK ? RectToSkRect(TrackRect()) |
90 : RectToSkRect(content_rect); | 90 : RectToSkRect(content_rect); |
91 canvas->drawRect(rect, flags); | 91 canvas->drawRect(rect, flags); |
92 } | 92 } |
93 | 93 |
| 94 bool FakeScrollbar::UsesNinePatchThumbResource() const { |
| 95 return false; |
| 96 } |
| 97 |
| 98 gfx::Size FakeScrollbar::NinePatchThumbCanvasSize() const { |
| 99 return gfx::Size(); |
| 100 } |
| 101 |
| 102 gfx::Rect FakeScrollbar::NinePatchThumbAperture() const { |
| 103 return gfx::Rect(); |
| 104 } |
| 105 |
94 } // namespace cc | 106 } // namespace cc |
OLD | NEW |