OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 24 matching lines...) Expand all Loading... |
35 #include "public/platform/WebScrollbarButtonsPlacement.h" | 35 #include "public/platform/WebScrollbarButtonsPlacement.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 // This enum must match NSScrollerStyle in the 10.7 SDK. | 39 // This enum must match NSScrollerStyle in the 10.7 SDK. |
40 enum ScrollerStyle { ScrollerStyleLegacy = 0, ScrollerStyleOverlay = 1 }; | 40 enum ScrollerStyle { ScrollerStyleLegacy = 0, ScrollerStyleOverlay = 1 }; |
41 | 41 |
42 class WebScrollbarTheme { | 42 class WebScrollbarTheme { |
43 public: | 43 public: |
44 // Updates the scrollbar appearance and behavior. | 44 // Updates the scrollbar appearance and behavior. |
45 // |initialButtonDelay| is the current value of NSScrollerButtonDelay from NSU
serDefaults. | 45 // |initialButtonDelay| is the current value of NSScrollerButtonDelay from |
46 // |autoscrollButtonDelay| is the current value of NSScrollerButtonPeriod from
NSUserDefaults. | 46 // NSUserDefaults. |
47 // |preferredScrollerStyle| is the current value of +[NSScroller preferredScro
llerStyle]. | 47 // |autoscrollButtonDelay| is the current value of NSScrollerButtonPeriod from |
| 48 // NSUserDefaults. |
| 49 // |preferredScrollerStyle| is the current value of +[NSScroller |
| 50 // preferredScrollerStyle]. |
48 // |redraw| is true if the update requires a redraw to include the change. | 51 // |redraw| is true if the update requires a redraw to include the change. |
49 // |buttonPlacement| is the current value of AppleScrollBarVariant | 52 // |buttonPlacement| is the current value of AppleScrollBarVariant |
50 BLINK_EXPORT static void updateScrollbarsWithNSDefaults( | 53 BLINK_EXPORT static void updateScrollbarsWithNSDefaults( |
51 float initialButtonDelay, | 54 float initialButtonDelay, |
52 float autoscrollButtonDelay, | 55 float autoscrollButtonDelay, |
53 ScrollerStyle preferredScrollerStyle, | 56 ScrollerStyle preferredScrollerStyle, |
54 bool redraw, | 57 bool redraw, |
55 WebScrollbarButtonsPlacement); | 58 WebScrollbarButtonsPlacement); |
56 }; | 59 }; |
57 | 60 |
58 } // namespace blink | 61 } // namespace blink |
59 | 62 |
60 #endif | 63 #endif |
OLD | NEW |