| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef ScrollbarTheme_h | 26 #ifndef ScrollbarTheme_h |
| 27 #define ScrollbarTheme_h | 27 #define ScrollbarTheme_h |
| 28 | 28 |
| 29 #include "platform/PlatformExport.h" | 29 #include "platform/PlatformExport.h" |
| 30 #include "platform/geometry/IntRect.h" | 30 #include "platform/geometry/IntRect.h" |
| 31 #include "platform/graphics/paint/DisplayItem.h" | 31 #include "platform/graphics/paint/DisplayItem.h" |
| 32 #include "platform/scroll/ScrollTypes.h" | 32 #include "platform/scroll/ScrollTypes.h" |
| 33 #include "public/platform/mac/MacScrollTypes.h" |
| 33 | 34 |
| 34 namespace blink { | 35 namespace blink { |
| 35 | 36 |
| 36 class GraphicsContext; | 37 class GraphicsContext; |
| 37 class PlatformMouseEvent; | 38 class PlatformMouseEvent; |
| 38 class ScrollbarThemeClient; | 39 class ScrollbarThemeClient; |
| 39 | 40 |
| 40 class PLATFORM_EXPORT ScrollbarTheme { | 41 class PLATFORM_EXPORT ScrollbarTheme { |
| 41 WTF_MAKE_NONCOPYABLE(ScrollbarTheme); WTF_MAKE_FAST_ALLOCATED(ScrollbarTheme
); | 42 WTF_MAKE_NONCOPYABLE(ScrollbarTheme); WTF_MAKE_FAST_ALLOCATED(ScrollbarTheme
); |
| 42 public: | 43 public: |
| 43 ScrollbarTheme() { } | 44 ScrollbarTheme() { } |
| 44 virtual ~ScrollbarTheme() { } | 45 virtual ~ScrollbarTheme() { } |
| 45 | 46 |
| 46 virtual void updateEnabledState(ScrollbarThemeClient*) { } | 47 virtual void updateEnabledState(ScrollbarThemeClient*) { } |
| 47 | 48 |
| 48 virtual bool paint(ScrollbarThemeClient*, GraphicsContext*, const IntRect& d
amageRect); | 49 virtual bool paint(ScrollbarThemeClient*, GraphicsContext*, const IntRect& d
amageRect); |
| 49 | 50 |
| 50 virtual ScrollbarPart hitTest(ScrollbarThemeClient*, const IntPoint&); | 51 virtual ScrollbarPart hitTest(ScrollbarThemeClient*, const IntPoint&); |
| 51 | 52 |
| 52 virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar) { re
turn 0; } | 53 virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar) { re
turn 0; } |
| 53 virtual int scrollbarMargin() const { return 0; } | 54 virtual int scrollbarMargin() const { return 0; } |
| 54 | 55 |
| 55 virtual ScrollbarButtonsPlacement buttonsPlacement() const { return Scrollba
rButtonsSingle; } | 56 virtual ScrollbarButtonsPlacement buttonsPlacement() const { return Scrollba
rButtonsPlacementSingle; } |
| 56 | 57 |
| 57 virtual bool supportsControlTints() const { return false; } | 58 virtual bool supportsControlTints() const { return false; } |
| 58 virtual bool usesOverlayScrollbars() const { return false; } | 59 virtual bool usesOverlayScrollbars() const { return false; } |
| 59 virtual void updateScrollbarOverlayStyle(ScrollbarThemeClient*) { } | 60 virtual void updateScrollbarOverlayStyle(ScrollbarThemeClient*) { } |
| 60 | 61 |
| 61 virtual bool invalidateOnMouseEnterExit() { return false; } | 62 virtual bool invalidateOnMouseEnterExit() { return false; } |
| 62 | 63 |
| 63 void invalidateParts(ScrollbarThemeClient* scrollbar, ScrollbarControlPartMa
sk mask) | 64 void invalidateParts(ScrollbarThemeClient* scrollbar, ScrollbarControlPartMa
sk mask) |
| 64 { | 65 { |
| 65 if (mask & BackButtonStartPart) | 66 if (mask & BackButtonStartPart) |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 static DisplayItem::Type buttonPartToDisplayItemType(ScrollbarPart); | 137 static DisplayItem::Type buttonPartToDisplayItemType(ScrollbarPart); |
| 137 static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart); | 138 static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart); |
| 138 | 139 |
| 139 private: | 140 private: |
| 140 static ScrollbarTheme* nativeTheme(); // Must be implemented to return the c
orrect theme subclass. | 141 static ScrollbarTheme* nativeTheme(); // Must be implemented to return the c
orrect theme subclass. |
| 141 static bool gMockScrollbarsEnabled; | 142 static bool gMockScrollbarsEnabled; |
| 142 }; | 143 }; |
| 143 | 144 |
| 144 } | 145 } |
| 145 #endif | 146 #endif |
| OLD | NEW |