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

Side by Side Diff: public/platform/WebThemeEngine.h

Issue 644223002: Remove WebThemeEngine::paintScrollbarThumb. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 21 matching lines...) Expand all
32 #define WebThemeEngine_h 32 #define WebThemeEngine_h
33 33
34 #include "WebCanvas.h" 34 #include "WebCanvas.h"
35 #include "WebColor.h" 35 #include "WebColor.h"
36 #include "WebSize.h" 36 #include "WebSize.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 struct WebRect; 40 struct WebRect;
41 41
42 // FIXME: crbug.com/327471. We need to merge the Apple and non-Apple implementat ions.
43
44 class WebThemeEngine { 42 class WebThemeEngine {
45 public: 43 public:
46 // The current state of the associated Part. 44 // The current state of the associated Part.
47 enum State { 45 enum State {
48 StateDisabled, 46 StateDisabled,
49 StateHover, // non-Apple 47 StateHover, // non-Apple
50 StateNormal, // non-Apple 48 StateNormal, // non-Apple
51 StatePressed, 49 StatePressed,
52 StateFocused, // non-Apple 50 StateFocused, // non-Apple
53 StateReadonly, // non-Apple 51 StateReadonly, // non-Apple
54 StateInactive, // Apple-specific 52 StateInactive, // Apple-specific
55 StateActive, // Apple-specific 53 StateActive, // Apple-specific
56 }; 54 };
57 55
58 // FIXME: The next section describes stuff only used on the Apple port.
59 enum Size {
60 SizeRegular,
61 SizeSmall,
62 };
63
64 enum ScrollbarOrientation {
65 ScrollbarOrientationHorizontal,
66 ScrollbarOrientationVertical,
67 };
68
69 enum ScrollbarParent {
70 ScrollbarParentScrollView,
71 ScrollbarParentRenderLayer,
72 };
73
74 struct ScrollbarInfo {
75 ScrollbarOrientation orientation;
76 ScrollbarParent parent;
77 int maxValue;
78 int currentValue;
79 int visibleSize;
80 int totalSize;
81 };
82
83 virtual void paintScrollbarThumb(WebCanvas*, State, Size, const WebRect&, co nst ScrollbarInfo&) { }
84
85 // FIXME: The remaining definitions are only used on the non-Apple ports.
86
87 // The UI part which is being accessed. 56 // The UI part which is being accessed.
88 enum Part { 57 enum Part {
89 // ScrollbarTheme parts 58 // ScrollbarTheme parts
90 PartScrollbarDownArrow, 59 PartScrollbarDownArrow,
91 PartScrollbarLeftArrow, 60 PartScrollbarLeftArrow,
92 PartScrollbarRightArrow, 61 PartScrollbarRightArrow,
93 PartScrollbarUpArrow, 62 PartScrollbarUpArrow,
94 PartScrollbarHorizontalThumb, 63 PartScrollbarHorizontalThumb,
95 PartScrollbarVerticalThumb, 64 PartScrollbarVerticalThumb,
96 PartScrollbarHorizontalTrack, 65 PartScrollbarHorizontalTrack,
97 PartScrollbarVerticalTrack, 66 PartScrollbarVerticalTrack,
98 PartScrollbarCorner, 67 PartScrollbarCorner,
99 68
100 // RenderTheme parts 69 // RenderTheme parts
101 PartCheckbox, 70 PartCheckbox,
102 PartRadio, 71 PartRadio,
103 PartButton, 72 PartButton,
104 PartTextField, 73 PartTextField,
105 PartMenuList, 74 PartMenuList,
106 PartSliderTrack, 75 PartSliderTrack,
107 PartSliderThumb, 76 PartSliderThumb,
108 PartInnerSpinButton, 77 PartInnerSpinButton,
109 PartProgressBar 78 PartProgressBar
110 }; 79 };
111 80
112
113 // Extra parameters for drawing the PartScrollbarHorizontalTrack and 81 // Extra parameters for drawing the PartScrollbarHorizontalTrack and
114 // PartScrollbarVerticalTrack. 82 // PartScrollbarVerticalTrack.
115 struct ScrollbarTrackExtraParams { 83 struct ScrollbarTrackExtraParams {
116 bool isBack; // Whether this is the 'back' part or the 'forward' part. 84 bool isBack; // Whether this is the 'back' part or the 'forward' part.
117 85
118 // The bounds of the entire track, as opposed to the part being painted. 86 // The bounds of the entire track, as opposed to the part being painted.
119 int trackX; 87 int trackX;
120 int trackY; 88 int trackY;
121 int trackWidth; 89 int trackWidth;
122 int trackHeight; 90 int trackHeight;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // like vertical scrollbar thumbs, the width will be the required width of 152 // like vertical scrollbar thumbs, the width will be the required width of
185 // the track while the height will be the minimum height. 153 // the track while the height will be the minimum height.
186 virtual WebSize getSize(Part) { return WebSize(); } 154 virtual WebSize getSize(Part) { return WebSize(); }
187 // Paint the given the given theme part. 155 // Paint the given the given theme part.
188 virtual void paint(WebCanvas*, Part, State, const WebRect&, const ExtraParam s*) { } 156 virtual void paint(WebCanvas*, Part, State, const WebRect&, const ExtraParam s*) { }
189 }; 157 };
190 158
191 } // namespace blink 159 } // namespace blink
192 160
193 #endif 161 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698