OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_aura.h" | 5 #include "ui/native_theme/native_theme_aura.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "grit/ui_resources.h" | 10 #include "grit/ui_resources.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 const int kScrollbarOverlayThumbStrokeImages[9] = | 60 const int kScrollbarOverlayThumbStrokeImages[9] = |
61 IMAGE_GRID_NO_CENTER(IDR_SCROLLBAR_OVERLAY_THUMB_STROKE); | 61 IMAGE_GRID_NO_CENTER(IDR_SCROLLBAR_OVERLAY_THUMB_STROKE); |
62 | 62 |
63 const int kScrollbarOverlayThumbFillImages[9] = | 63 const int kScrollbarOverlayThumbFillImages[9] = |
64 IMAGE_GRID(IDR_SCROLLBAR_OVERLAY_THUMB_FILL); | 64 IMAGE_GRID(IDR_SCROLLBAR_OVERLAY_THUMB_FILL); |
65 | 65 |
66 const int kScrollbarTrackImages[9] = IMAGE_GRID(IDR_SCROLLBAR_BASE); | 66 const int kScrollbarTrackImages[9] = IMAGE_GRID(IDR_SCROLLBAR_BASE); |
67 | 67 |
68 } // namespace | 68 } // namespace |
69 | 69 |
70 #if !defined(OS_WIN) | 70 #if !defined(OS_WIN) && !defined(OS_MACOSX) |
71 // static | 71 // static |
72 NativeTheme* NativeTheme::instance() { | 72 NativeTheme* NativeTheme::instance() { |
73 return NativeThemeAura::instance(); | 73 return NativeThemeAura::instance(); |
74 } | 74 } |
| 75 #endif |
75 | 76 |
| 77 #if !defined(OS_WIN) |
76 // static | 78 // static |
77 NativeThemeAura* NativeThemeAura::instance() { | 79 NativeThemeAura* NativeThemeAura::instance() { |
78 CR_DEFINE_STATIC_LOCAL(NativeThemeAura, s_native_theme, ()); | 80 CR_DEFINE_STATIC_LOCAL(NativeThemeAura, s_native_theme, ()); |
79 return &s_native_theme; | 81 return &s_native_theme; |
80 } | 82 } |
81 #endif | 83 #endif |
82 | 84 |
83 NativeThemeAura::NativeThemeAura() { | 85 NativeThemeAura::NativeThemeAura() { |
84 // We don't draw scrollbar buttons. | 86 // We don't draw scrollbar buttons. |
85 #if defined(OS_CHROMEOS) | 87 #if defined(OS_CHROMEOS) |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 scoped_ptr<NineImagePainter> stroke_painter, | 277 scoped_ptr<NineImagePainter> stroke_painter, |
276 const uint8 stroke_alphas[kMaxState]) | 278 const uint8 stroke_alphas[kMaxState]) |
277 : fill_painter(fill_painter.Pass()), | 279 : fill_painter(fill_painter.Pass()), |
278 fill_alphas(fill_alphas), | 280 fill_alphas(fill_alphas), |
279 stroke_painter(stroke_painter.Pass()), | 281 stroke_painter(stroke_painter.Pass()), |
280 stroke_alphas(stroke_alphas) {} | 282 stroke_alphas(stroke_alphas) {} |
281 | 283 |
282 NativeThemeAura::DualPainter::~DualPainter() {} | 284 NativeThemeAura::DualPainter::~DualPainter() {} |
283 | 285 |
284 } // namespace ui | 286 } // namespace ui |
OLD | NEW |