| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008, 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 [[BlinkScrollbarObserver alloc] initWithScrollbar:&scrollbar | 218 [[BlinkScrollbarObserver alloc] initWithScrollbar:&scrollbar |
| 219 painter:scrollbarPainter]); | 219 painter:scrollbarPainter]); |
| 220 | 220 |
| 221 scrollbarPainterMap().insert(&scrollbar, observer); | 221 scrollbarPainterMap().insert(&scrollbar, observer); |
| 222 updateEnabledState(scrollbar); | 222 updateEnabledState(scrollbar); |
| 223 updateScrollbarOverlayColorTheme(scrollbar); | 223 updateScrollbarOverlayColorTheme(scrollbar); |
| 224 } | 224 } |
| 225 | 225 |
| 226 void ScrollbarThemeMac::unregisterScrollbar(ScrollbarThemeClient& scrollbar) { | 226 void ScrollbarThemeMac::unregisterScrollbar(ScrollbarThemeClient& scrollbar) { |
| 227 scrollbarPainterMap().remove(&scrollbar); | 227 scrollbarPainterMap().remove(&scrollbar); |
| 228 scrollbarSet().remove(&scrollbar); | 228 scrollbarSet().erase(&scrollbar); |
| 229 } | 229 } |
| 230 | 230 |
| 231 void ScrollbarThemeMac::setNewPainterForScrollbar( | 231 void ScrollbarThemeMac::setNewPainterForScrollbar( |
| 232 ScrollbarThemeClient& scrollbar, | 232 ScrollbarThemeClient& scrollbar, |
| 233 ScrollbarPainter newPainter) { | 233 ScrollbarPainter newPainter) { |
| 234 RetainPtr<ScrollbarPainter> scrollbarPainter(AdoptNS, [newPainter retain]); | 234 RetainPtr<ScrollbarPainter> scrollbarPainter(AdoptNS, [newPainter retain]); |
| 235 RetainPtr<BlinkScrollbarObserver> observer( | 235 RetainPtr<BlinkScrollbarObserver> observer( |
| 236 AdoptNS, | 236 AdoptNS, |
| 237 [[BlinkScrollbarObserver alloc] initWithScrollbar:&scrollbar | 237 [[BlinkScrollbarObserver alloc] initWithScrollbar:&scrollbar |
| 238 painter:scrollbarPainter]); | 238 painter:scrollbarPainter]); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 } | 409 } |
| 410 | 410 |
| 411 // static | 411 // static |
| 412 NSScrollerStyle ScrollbarThemeMac::recommendedScrollerStyle() { | 412 NSScrollerStyle ScrollbarThemeMac::recommendedScrollerStyle() { |
| 413 if (RuntimeEnabledFeatures::overlayScrollbarsEnabled()) | 413 if (RuntimeEnabledFeatures::overlayScrollbarsEnabled()) |
| 414 return NSScrollerStyleOverlay; | 414 return NSScrollerStyleOverlay; |
| 415 return gPreferredScrollerStyle; | 415 return gPreferredScrollerStyle; |
| 416 } | 416 } |
| 417 | 417 |
| 418 } // namespace blink | 418 } // namespace blink |
| OLD | NEW |