| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 156 |
| 157 // Gets the size of the given theme part. For variable sized items | 157 // Gets the size of the given theme part. For variable sized items |
| 158 // like vertical scrollbar thumbs, the width will be the required width of | 158 // like vertical scrollbar thumbs, the width will be the required width of |
| 159 // the track while the height will be the minimum height. | 159 // the track while the height will be the minimum height. |
| 160 virtual WebSize getSize(Part) { return WebSize(); } | 160 virtual WebSize getSize(Part) { return WebSize(); } |
| 161 | 161 |
| 162 struct ScrollbarStyle { | 162 struct ScrollbarStyle { |
| 163 int thumbThickness; | 163 int thumbThickness; |
| 164 int scrollbarMargin; | 164 int scrollbarMargin; |
| 165 WebColor color; | 165 WebColor color; |
| 166 double fadeOutDelaySeconds; |
| 167 double fadeOutDurationSeconds; |
| 166 }; | 168 }; |
| 167 | 169 |
| 168 // Gets the overlay scrollbar style. Used for mobile theme. | 170 // Gets the overlay scrollbar style. Not used on Mac. |
| 169 virtual void getOverlayScrollbarStyle(ScrollbarStyle*) {} | 171 virtual void getOverlayScrollbarStyle(ScrollbarStyle* style) { |
| 172 // Disable overlay scrollbar fade out (for non-composited scrollers) unless |
| 173 // explicitly enabled by the implementing child class. NOTE: these values |
| 174 // aren't used to control Mac fade out - that happens in ScrollAnimatorMac. |
| 175 style->fadeOutDelaySeconds = 0.0; |
| 176 style->fadeOutDurationSeconds = 0.0; |
| 177 // The other fields in this struct are used only on Android to draw solid |
| 178 // color scrollbars. On other platforms the scrollbars are painted in |
| 179 // NativeTheme so these fields are unused in non-Android WebThemeEngines. |
| 180 } |
| 170 | 181 |
| 171 // Paint the given the given theme part. | 182 // Paint the given the given theme part. |
| 172 virtual void paint(WebCanvas*, | 183 virtual void paint(WebCanvas*, |
| 173 Part, | 184 Part, |
| 174 State, | 185 State, |
| 175 const WebRect&, | 186 const WebRect&, |
| 176 const ExtraParams*) {} | 187 const ExtraParams*) {} |
| 177 }; | 188 }; |
| 178 | 189 |
| 179 } // namespace blink | 190 } // namespace blink |
| 180 | 191 |
| 181 #endif | 192 #endif |
| OLD | NEW |