Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 130 | 130 |
| 131 // Extra parameters for PartProgressBar | 131 // Extra parameters for PartProgressBar |
| 132 struct ProgressBarExtraParams { | 132 struct ProgressBarExtraParams { |
| 133 bool determinate; | 133 bool determinate; |
| 134 int valueRectX; | 134 int valueRectX; |
| 135 int valueRectY; | 135 int valueRectY; |
| 136 int valueRectWidth; | 136 int valueRectWidth; |
| 137 int valueRectHeight; | 137 int valueRectHeight; |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 // Extra parameters for Scrollbar, now only for overlay-scrollbar | |
| 141 enum ScrollbarOverlayStyle { | |
|
bokan
2016/10/18 19:55:25
Style is misleading in this context. How about Scr
| |
| 142 ScrollbarOverlayStyleDefault, | |
| 143 ScrollbarOverlayStyleDark, | |
| 144 ScrollbarOverlayStyleLight | |
| 145 }; | |
| 146 | |
| 140 union ExtraParams { | 147 union ExtraParams { |
| 141 ScrollbarTrackExtraParams scrollbarTrack; | 148 ScrollbarTrackExtraParams scrollbarTrack; |
| 142 ButtonExtraParams button; | 149 ButtonExtraParams button; |
| 143 TextFieldExtraParams textField; | 150 TextFieldExtraParams textField; |
| 144 MenuListExtraParams menuList; | 151 MenuListExtraParams menuList; |
| 145 SliderExtraParams slider; | 152 SliderExtraParams slider; |
| 146 InnerSpinButtonExtraParams innerSpin; | 153 InnerSpinButtonExtraParams innerSpin; |
| 147 ProgressBarExtraParams progressBar; | 154 ProgressBarExtraParams progressBar; |
| 155 ScrollbarOverlayStyle scrollbarStyle; | |
| 148 }; | 156 }; |
| 149 | 157 |
| 150 // Gets the size of the given theme part. For variable sized items | 158 // Gets the size of the given theme part. For variable sized items |
| 151 // like vertical scrollbar thumbs, the width will be the required width of | 159 // like vertical scrollbar thumbs, the width will be the required width of |
| 152 // the track while the height will be the minimum height. | 160 // the track while the height will be the minimum height. |
| 153 virtual WebSize getSize(Part) { return WebSize(); } | 161 virtual WebSize getSize(Part) { return WebSize(); } |
| 154 | 162 |
| 155 struct ScrollbarStyle { | 163 struct ScrollbarStyle { |
| 156 int thumbThickness; | 164 int thumbThickness; |
| 157 int scrollbarMargin; | 165 int scrollbarMargin; |
| 158 WebColor color; | 166 WebColor color; |
| 159 }; | 167 }; |
| 160 | 168 |
| 161 // Gets the overlay scrollbar style. Used for mobile theme. | 169 // Gets the overlay scrollbar style. Used for mobile theme. |
| 162 virtual void getOverlayScrollbarStyle(ScrollbarStyle*) {} | 170 virtual void getOverlayScrollbarStyle(ScrollbarStyle*) {} |
| 163 | 171 |
| 164 // Paint the given the given theme part. | 172 // Paint the given the given theme part. |
| 165 virtual void paint(WebCanvas*, | 173 virtual void paint(WebCanvas*, |
| 166 Part, | 174 Part, |
| 167 State, | 175 State, |
| 168 const WebRect&, | 176 const WebRect&, |
| 169 const ExtraParams*) {} | 177 const ExtraParams*) {} |
| 170 }; | 178 }; |
| 171 | 179 |
| 172 } // namespace blink | 180 } // namespace blink |
| 173 | 181 |
| 174 #endif | 182 #endif |
| OLD | NEW |