Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1464)

Unified Diff: Source/core/platform/mac/ScrollbarThemeMacOverlayAPI.h

Issue 21108004: Separate ScrollbarThemeMac into separate files (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@second_refactor
Patch Set: Incorporate review feedback Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/platform/mac/ScrollbarThemeMacOverlayAPI.h
diff --git a/Source/core/platform/chromium/ScrollbarThemeChromiumDefault.h b/Source/core/platform/mac/ScrollbarThemeMacOverlayAPI.h
similarity index 55%
copy from Source/core/platform/chromium/ScrollbarThemeChromiumDefault.h
copy to Source/core/platform/mac/ScrollbarThemeMacOverlayAPI.h
index 133dab06edc62645b45cd9f3f9197a7e3ddac737..890c3cec806b635a7adb2d91585762cfef18e297 100644
--- a/Source/core/platform/chromium/ScrollbarThemeChromiumDefault.h
+++ b/Source/core/platform/mac/ScrollbarThemeMacOverlayAPI.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Google Inc. All rights reserved.
+ * Copyright (C) 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -28,26 +28,43 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ScrollbarThemeChromiumDefault_h
-#define ScrollbarThemeChromiumDefault_h
+#ifndef ScrollbarThemeMacOverlayAPI_h
+#define ScrollbarThemeMacOverlayAPI_h
-#include "core/platform/chromium/ScrollbarThemeChromium.h"
+#include "core/platform/mac/ScrollbarThemeMac.h"
+
+typedef id ScrollbarPainter;
namespace WebCore {
-class ScrollbarThemeChromiumDefault : public ScrollbarThemeChromium {
+class ScrollbarThemeMacOverlayAPI : public ScrollbarThemeMacCommon {
public:
- virtual int scrollbarThickness(ScrollbarControlSize);
+ virtual void updateEnabledState(ScrollbarThemeClient*);
+ virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar);
+ virtual bool usesOverlayScrollbars() const;
+ virtual void updateScrollbarOverlayStyle(ScrollbarThemeClient*);
+ virtual ScrollbarButtonsPlacement buttonsPlacement() const;
-protected:
- virtual void paintTrackPiece(GraphicsContext*, ScrollbarThemeClient*, const IntRect&, ScrollbarPart);
- virtual void paintButton(GraphicsContext*, ScrollbarThemeClient*, const IntRect&, ScrollbarPart);
+ virtual void registerScrollbar(ScrollbarThemeClient*);
+ virtual void unregisterScrollbar(ScrollbarThemeClient*);
+
+ void setNewPainterForScrollbar(ScrollbarThemeClient*, ScrollbarPainter);
+ ScrollbarPainter painterForScrollbar(ScrollbarThemeClient*);
+
+ virtual void paintTrackBackground(GraphicsContext*, ScrollbarThemeClient*, const IntRect&);
virtual void paintThumb(GraphicsContext*, ScrollbarThemeClient*, const IntRect&);
- virtual bool shouldCenterOnThumb(ScrollbarThemeClient*, const PlatformMouseEvent&);
- virtual IntSize buttonSize(ScrollbarThemeClient*);
+
+protected:
+ virtual IntRect trackRect(ScrollbarThemeClient*, bool painting = false);
+ virtual IntRect backButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool painting = false);
+ virtual IntRect forwardButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool painting = false);
+
+ virtual bool hasButtons(ScrollbarThemeClient*) { return false; }
+ virtual bool hasThumb(ScrollbarThemeClient*);
+
virtual int minimumThumbLength(ScrollbarThemeClient*);
};
-} // namespace WebCore
+}
#endif
« no previous file with comments | « Source/core/platform/mac/ScrollbarThemeMacNonOverlayAPI.mm ('k') | Source/core/platform/mac/ScrollbarThemeMacOverlayAPI.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698