| 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 "cc/input/scrollbar.h" | 9 #include "cc/input/scrollbar.h" |
| 10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 virtual ScrollbarOrientation Orientation() const OVERRIDE; | 21 virtual ScrollbarOrientation Orientation() const OVERRIDE; |
| 22 virtual bool IsLeftSideVerticalScrollbar() const OVERRIDE; | 22 virtual bool IsLeftSideVerticalScrollbar() const OVERRIDE; |
| 23 virtual gfx::Point Location() const OVERRIDE; | 23 virtual gfx::Point Location() const OVERRIDE; |
| 24 virtual bool IsOverlay() const OVERRIDE; | 24 virtual bool IsOverlay() const OVERRIDE; |
| 25 virtual bool HasThumb() const OVERRIDE; | 25 virtual bool HasThumb() const OVERRIDE; |
| 26 virtual int ThumbThickness() const OVERRIDE; | 26 virtual int ThumbThickness() const OVERRIDE; |
| 27 virtual int ThumbLength() const OVERRIDE; | 27 virtual int ThumbLength() const OVERRIDE; |
| 28 virtual gfx::Rect TrackRect() const OVERRIDE; | 28 virtual gfx::Rect TrackRect() const OVERRIDE; |
| 29 virtual void PaintPart(SkCanvas* canvas, | 29 virtual void PaintPart(SkCanvas* canvas, |
| 30 ScrollbarPart part, | 30 ScrollbarPart part, |
| 31 gfx::Rect content_rect) OVERRIDE; | 31 const gfx::Rect& content_rect) OVERRIDE; |
| 32 | 32 |
| 33 void set_location(gfx::Point location) { location_ = location; } | 33 void set_location(gfx::Point location) { location_ = location; } |
| 34 void set_track_rect(gfx::Rect track_rect) { track_rect_ = track_rect; } | 34 void set_track_rect(const gfx::Rect& track_rect) { track_rect_ = track_rect; } |
| 35 void set_thumb_thickness(int thumb_thickness) { | 35 void set_thumb_thickness(int thumb_thickness) { |
| 36 thumb_thickness_ = thumb_thickness; | 36 thumb_thickness_ = thumb_thickness; |
| 37 } | 37 } |
| 38 void set_thumb_length(int thumb_length) { thumb_length_ = thumb_length; } | 38 void set_thumb_length(int thumb_length) { thumb_length_ = thumb_length; } |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 bool paint_; | 41 bool paint_; |
| 42 bool has_thumb_; | 42 bool has_thumb_; |
| 43 bool is_overlay_; | 43 bool is_overlay_; |
| 44 int thumb_thickness_; | 44 int thumb_thickness_; |
| 45 int thumb_length_; | 45 int thumb_length_; |
| 46 gfx::Point location_; | 46 gfx::Point location_; |
| 47 gfx::Rect track_rect_; | 47 gfx::Rect track_rect_; |
| 48 SkColor fill_color_; | 48 SkColor fill_color_; |
| 49 | 49 |
| 50 DISALLOW_COPY_AND_ASSIGN(FakeScrollbar); | 50 DISALLOW_COPY_AND_ASSIGN(FakeScrollbar); |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 } // namespace cc | 53 } // namespace cc |
| 54 | 54 |
| 55 #endif // CC_TEST_FAKE_SCROLLBAR_H_ | 55 #endif // CC_TEST_FAKE_SCROLLBAR_H_ |
| OLD | NEW |