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