Index: public/platform/WebThemeEngine.h |
diff --git a/public/platform/default/WebThemeEngine.h b/public/platform/WebThemeEngine.h |
similarity index 84% |
rename from public/platform/default/WebThemeEngine.h |
rename to public/platform/WebThemeEngine.h |
index f8a1e75483567a9d43671b2e69380e8facee0a34..560335bb7af6efafd1991c39515095891b1f9004 100644 |
--- a/public/platform/default/WebThemeEngine.h |
+++ b/public/platform/WebThemeEngine.h |
@@ -31,16 +31,62 @@ |
#ifndef WebThemeEngine_h |
#define WebThemeEngine_h |
-#include "../WebCanvas.h" |
-#include "../WebColor.h" |
-#include "../WebSize.h" |
+#include "WebCanvas.h" |
+#include "WebColor.h" |
+#include "WebSize.h" |
namespace blink { |
struct WebRect; |
+// FIXME: crbug.com/327471. Here and above, we need to merge the Mac and |
+// non-Mac implementations. |
+ |
class WebThemeEngine { |
public: |
+ // The current state of the associated Part. |
+ enum State { |
+ StateDisabled, |
+#ifdef __APPLE__ |
jamesr
2014/02/05 20:30:33
why make these conditional? i think the reasonable
Dirk Pranke
2014/02/05 21:34:39
I was a bit concerned that there might be issues w
|
+ StateInactive, |
+ StateActive, |
+ StatePressed, |
+#else |
+ StateHover, |
+ StateNormal, |
+ StatePressed, |
+ StateFocused, |
+ StateReadonly, |
+#endif |
+ }; |
+ |
+#ifdef __APPLE__ |
jamesr
2014/02/05 20:30:33
i don't really see any harm in having these define
Dirk Pranke
2014/02/05 21:34:39
fair enough, will do.
|
+ enum Size { |
+ SizeRegular, |
+ SizeSmall, |
+ }; |
+ |
+ enum ScrollbarOrientation { |
+ ScrollbarOrientationHorizontal, |
+ ScrollbarOrientationVertical, |
+ }; |
+ |
+ enum ScrollbarParent { |
+ ScrollbarParentScrollView, |
+ ScrollbarParentRenderLayer, |
+ }; |
+ |
+ struct ScrollbarInfo { |
+ ScrollbarOrientation orientation; |
+ ScrollbarParent parent; |
+ int maxValue; |
+ int currentValue; |
+ int visibleSize; |
+ int totalSize; |
+ }; |
+ |
+ virtual void paintScrollbarThumb(WebCanvas*, State, Size, const WebRect&, const ScrollbarInfo&) { } |
+#else |
// The UI part which is being accessed. |
enum Part { |
// ScrollbarTheme parts |
@@ -66,15 +112,6 @@ public: |
PartProgressBar |
}; |
- // The current state of the associated Part. |
- enum State { |
- StateDisabled, |
- StateHover, |
- StateNormal, |
- StatePressed, |
- StateFocused, |
- StateReadonly, |
- }; |
// Extra parameters for drawing the PartScrollbarHorizontalTrack and |
// PartScrollbarVerticalTrack. |
@@ -152,6 +189,7 @@ public: |
virtual WebSize getSize(Part) { return WebSize(); } |
// Paint the given the given theme part. |
virtual void paint(WebCanvas*, Part, State, const WebRect&, const ExtraParams*) { } |
+#endif |
}; |
} // namespace blink |