#ifndef ScrollbarThemeMacCommon_h
#define ScrollbarThemeMacCommon_h
#include "platform/mac/NSScrollerImpDetails.h"
#include "platform/scroll/ScrollbarTheme.h"
namespace WebCore {
class PLATFORM_EXPORT ScrollbarThemeMacCommon : public ScrollbarTheme {
public:
virtual ~ScrollbarThemeMacCommon();
virtual void registerScrollbar(ScrollbarThemeClient*) OVERRIDE;
virtual void unregisterScrollbar(ScrollbarThemeClient*) OVERRIDE;
void preferencesChanged(float initialButtonDelay, float autoscrollButtonDelay, NSScrollerStyle preferredScrollerStyle, bool redraw);
virtual bool supportsControlTints() const OVERRIDE { return true; }
virtual double initialAutoscrollTimerDelay() OVERRIDE;
virtual double autoscrollTimerDelay() OVERRIDE;
virtual void paintOverhangBackground(GraphicsContext*, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect) OVERRIDE;
virtual void paintOverhangShadows(GraphicsContext*, const IntSize& scrollOffset, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect) OVERRIDE;
virtual void paintTickmarks(GraphicsContext*, ScrollbarThemeClient*, const IntRect&) OVERRIDE;
static NSScrollerStyle recommendedScrollerStyle();
static bool isOverlayAPIAvailable();
protected:
virtual int maxOverlapBetweenPages() OVERRIDE { return 40; }
virtual bool shouldDragDocumentInsteadOfThumb(ScrollbarThemeClient*, const PlatformMouseEvent&) OVERRIDE;
int scrollbarPartToHIPressedState(ScrollbarPart);
virtual void updateButtonPlacement() { }
void paintGivenTickmarks(GraphicsContext*, ScrollbarThemeClient*, const IntRect&, const Vector<IntRect>&);
RefPtr<Pattern> m_overhangPattern;
};
}
#endif