OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "ui/native_theme/native_theme_mac.h" | 5 #include "ui/native_theme/native_theme_mac.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 SkScalarRoundToInt(255.0 * components[0]), | 119 SkScalarRoundToInt(255.0 * components[0]), |
120 SkScalarRoundToInt(255.0 * components[0]), | 120 SkScalarRoundToInt(255.0 * components[0]), |
121 SkScalarRoundToInt(255.0 * components[0])); | 121 SkScalarRoundToInt(255.0 * components[0])); |
122 } | 122 } |
123 | 123 |
124 } // namespace | 124 } // namespace |
125 | 125 |
126 namespace ui { | 126 namespace ui { |
127 | 127 |
128 // static | 128 // static |
129 NativeTheme* NativeTheme::instance() { | 129 NativeTheme* NativeTheme::GetInstanceForWeb() { |
130 return NativeThemeMac::instance(); | 130 return NativeThemeMac::instance(); |
131 } | 131 } |
132 | 132 |
133 // static | 133 // static |
134 NativeThemeMac* NativeThemeMac::instance() { | 134 NativeThemeMac* NativeThemeMac::instance() { |
135 CR_DEFINE_STATIC_LOCAL(NativeThemeMac, s_native_theme, ()); | 135 CR_DEFINE_STATIC_LOCAL(NativeThemeMac, s_native_theme, ()); |
136 return &s_native_theme; | 136 return &s_native_theme; |
137 } | 137 } |
138 | 138 |
139 SkColor NativeThemeMac::GetSystemColor(ColorId color_id) const { | 139 SkColor NativeThemeMac::GetSystemColor(ColorId color_id) const { |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 set_scrollbar_button_length(0); | 414 set_scrollbar_button_length(0); |
415 SetScrollbarColors(kScrollerThumbColor, | 415 SetScrollbarColors(kScrollerThumbColor, |
416 kScrollerThumbHoverColor, | 416 kScrollerThumbHoverColor, |
417 kScrollerTrackGradientColors[0]); | 417 kScrollerTrackGradientColors[0]); |
418 } | 418 } |
419 | 419 |
420 NativeThemeMac::~NativeThemeMac() { | 420 NativeThemeMac::~NativeThemeMac() { |
421 } | 421 } |
422 | 422 |
423 } // namespace ui | 423 } // namespace ui |
OLD | NEW |