| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |