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

Unified Diff: public/platform/WebThemeEngine.h

Issue 154733004: Switch to a single merged version of WebThemeEngine.h (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: reorder the State enums to not break the mock theme Created 6 years, 10 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
« no previous file with comments | « Source/platform/scroll/ScrollbarThemeMacNonOverlayAPI.mm ('k') | public/platform/android/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebThemeEngine.h
diff --git a/public/platform/default/WebThemeEngine.h b/public/platform/WebThemeEngine.h
similarity index 81%
copy from public/platform/default/WebThemeEngine.h
copy to public/platform/WebThemeEngine.h
index f8a1e75483567a9d43671b2e69380e8facee0a34..aa3fe1c66830e18e3312cd5062f4298902de2793 100644
--- a/public/platform/default/WebThemeEngine.h
+++ b/public/platform/WebThemeEngine.h
@@ -31,16 +31,59 @@
#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. We need to merge the Apple and non-Apple implementations.
+
class WebThemeEngine {
public:
+ // The current state of the associated Part.
+ enum State {
+ StateDisabled,
+ StateHover, // non-Apple
+ StateNormal, // non-Apple
+ StatePressed,
+ StateFocused, // non-Apple
+ StateReadonly, // non-Apple
+ StateInactive, // Apple-specific
+ StateActive, // Apple-specific
+ };
+
+ // FIXME: The next section describes stuff only used on the Apple port.
+ 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&) { }
+
+ // FIXME: The remaining definitions are only used on the non-Apple ports.
+
// The UI part which is being accessed.
enum Part {
// ScrollbarTheme parts
@@ -66,15 +109,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.
« no previous file with comments | « Source/platform/scroll/ScrollbarThemeMacNonOverlayAPI.mm ('k') | public/platform/android/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698