OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/gfx/native_theme_aura.h" | 5 #include "ui/gfx/native_theme_aura.h" |
6 | 6 |
| 7 #include "base/basictypes.h" |
7 #include "grit/gfx_resources.h" | 8 #include "grit/gfx_resources.h" |
8 #include "ui/base/resource/resource_bundle.h" | 9 #include "ui/base/resource/resource_bundle.h" |
9 #include "ui/gfx/size.h" | 10 #include "ui/gfx/size.h" |
10 #include "ui/gfx/skbitmap_operations.h" | 11 #include "ui/gfx/skbitmap_operations.h" |
11 | 12 |
12 namespace { | 13 namespace { |
13 | 14 |
14 const SkColor kMenuBackgroundColor = SkColorSetRGB(0xed, 0xed, 0xed); | 15 const SkColor kMenuBackgroundColor = SkColorSetRGB(0xed, 0xed, 0xed); |
15 | 16 |
16 } // namespace | 17 } // namespace |
17 | 18 |
18 namespace gfx { | 19 namespace gfx { |
19 | 20 |
20 // static | 21 // static |
21 const NativeTheme* NativeTheme::instance() { | 22 const NativeTheme* NativeTheme::instance() { |
22 return NativeThemeAura::instance(); | 23 return NativeThemeAura::instance(); |
23 } | 24 } |
24 | 25 |
25 // static | 26 // static |
26 const NativeThemeAura* NativeThemeAura::instance() { | 27 const NativeThemeAura* NativeThemeAura::instance() { |
27 static const NativeThemeAura s_native_theme; | 28 CR_DEFINE_STATIC_LOCAL(NativeThemeAura, s_native_theme, ()); |
28 return &s_native_theme; | 29 return &s_native_theme; |
29 } | 30 } |
30 | 31 |
31 NativeThemeAura::NativeThemeAura() { | 32 NativeThemeAura::NativeThemeAura() { |
32 } | 33 } |
33 | 34 |
34 NativeThemeAura::~NativeThemeAura() { | 35 NativeThemeAura::~NativeThemeAura() { |
35 } | 36 } |
36 | 37 |
37 void NativeThemeAura::PaintMenuPopupBackground( | 38 void NativeThemeAura::PaintMenuPopupBackground( |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 SkBitmapOperations::CreateTransposedBtmap(*vertical_bitmap); | 168 SkBitmapOperations::CreateTransposedBtmap(*vertical_bitmap); |
168 SkBitmap* horizontal_bitmap = new SkBitmap(transposed_bitmap); | 169 SkBitmap* horizontal_bitmap = new SkBitmap(transposed_bitmap); |
169 | 170 |
170 horizontal_bitmaps_[resource_id] = horizontal_bitmap; | 171 horizontal_bitmaps_[resource_id] = horizontal_bitmap; |
171 return horizontal_bitmap; | 172 return horizontal_bitmap; |
172 } | 173 } |
173 return NULL; | 174 return NULL; |
174 } | 175 } |
175 | 176 |
176 } // namespace gfx | 177 } // namespace gfx |
OLD | NEW |