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

Side by Side Diff: content/browser/theme_helper_mac.mm

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/theme_helper_mac.h" 5 #include "content/browser/theme_helper_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 content::ThemeHelperMac::GetPreferredScrollerStyle(), redraw, 129 content::ThemeHelperMac::GetPreferredScrollerStyle(), redraw,
130 GetScrollAnimationEnabled(), GetButtonPlacement()); 130 GetScrollAnimationEnabled(), GetButtonPlacement());
131 } 131 }
132 132
133 @end 133 @end
134 134
135 namespace content { 135 namespace content {
136 136
137 // static 137 // static
138 ThemeHelperMac* ThemeHelperMac::GetInstance() { 138 ThemeHelperMac* ThemeHelperMac::GetInstance() {
139 return Singleton<ThemeHelperMac, 139 return base::Singleton<ThemeHelperMac,
140 LeakySingletonTraits<ThemeHelperMac> >::get(); 140 base::LeakySingletonTraits<ThemeHelperMac>>::get();
141 } 141 }
142 142
143 // static 143 // static
144 blink::ScrollerStyle ThemeHelperMac::GetPreferredScrollerStyle() { 144 blink::ScrollerStyle ThemeHelperMac::GetPreferredScrollerStyle() {
145 if (![NSScroller respondsToSelector:@selector(preferredScrollerStyle)]) 145 if (![NSScroller respondsToSelector:@selector(preferredScrollerStyle)])
146 return blink::ScrollerStyleLegacy; 146 return blink::ScrollerStyleLegacy;
147 return static_cast<blink::ScrollerStyle>([NSScroller preferredScrollerStyle]); 147 return static_cast<blink::ScrollerStyle>([NSScroller preferredScrollerStyle]);
148 } 148 }
149 149
150 // static 150 // static
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 [defaults boolForKey:@"AppleScrollerPagingBehavior"]; 201 [defaults boolForKey:@"AppleScrollerPagingBehavior"];
202 params.preferred_scroller_style = GetPreferredScrollerStyle(); 202 params.preferred_scroller_style = GetPreferredScrollerStyle();
203 params.redraw = false; 203 params.redraw = false;
204 params.scroll_animation_enabled = GetScrollAnimationEnabled(); 204 params.scroll_animation_enabled = GetScrollAnimationEnabled();
205 params.button_placement = GetButtonPlacement(); 205 params.button_placement = GetButtonPlacement();
206 206
207 rph->Send(new ViewMsg_UpdateScrollbarTheme(params)); 207 rph->Send(new ViewMsg_UpdateScrollbarTheme(params));
208 } 208 }
209 209
210 } // namespace content 210 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/theme_helper_mac.h ('k') | content/browser/tracing/etw_system_event_consumer_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698