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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.mm

Issue 2693433002: Migrate WTF::HashMap::add() to ::insert() [final] (Closed)
Patch Set: more platform-specific references Created 3 years, 10 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
OLDNEW
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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 AdoptNS, [[NSClassFromString(@"NSScrollerImp") 211 AdoptNS, [[NSClassFromString(@"NSScrollerImp")
212 scrollerImpWithStyle:recommendedScrollerStyle() 212 scrollerImpWithStyle:recommendedScrollerStyle()
213 controlSize:(NSControlSize)scrollbar.controlSize() 213 controlSize:(NSControlSize)scrollbar.controlSize()
214 horizontal:isHorizontal 214 horizontal:isHorizontal
215 replacingScrollerImp:nil] retain]); 215 replacingScrollerImp:nil] retain]);
216 RetainPtr<BlinkScrollbarObserver> observer( 216 RetainPtr<BlinkScrollbarObserver> observer(
217 AdoptNS, 217 AdoptNS,
218 [[BlinkScrollbarObserver alloc] initWithScrollbar:&scrollbar 218 [[BlinkScrollbarObserver alloc] initWithScrollbar:&scrollbar
219 painter:scrollbarPainter]); 219 painter:scrollbarPainter]);
220 220
221 scrollbarPainterMap().add(&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().remove(&scrollbar);
229 } 229 }
230 230
231 void ScrollbarThemeMac::setNewPainterForScrollbar( 231 void ScrollbarThemeMac::setNewPainterForScrollbar(
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698