| 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_chromeos.h" | 5 #include "ui/gfx/native_theme_chromeos.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "grit/gfx_resources.h" | 8 #include "grit/gfx_resources.h" |
| 9 #include "third_party/skia/include/effects/SkGradientShader.h" | 9 #include "third_party/skia/include/effects/SkGradientShader.h" |
| 10 #include "third_party/skia/include/core/SkPaint.h" | 10 #include "third_party/skia/include/core/SkPaint.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 namespace gfx { | 233 namespace gfx { |
| 234 | 234 |
| 235 // static | 235 // static |
| 236 const NativeTheme* NativeTheme::instance() { | 236 const NativeTheme* NativeTheme::instance() { |
| 237 return NativeThemeChromeos::instance(); | 237 return NativeThemeChromeos::instance(); |
| 238 } | 238 } |
| 239 | 239 |
| 240 // static | 240 // static |
| 241 const NativeThemeChromeos* NativeThemeChromeos::instance() { | 241 const NativeThemeChromeos* NativeThemeChromeos::instance() { |
| 242 // The global NativeThemeChromeos instance. | 242 // The global NativeThemeChromeos instance. |
| 243 static NativeThemeChromeos s_native_theme; | 243 CR_DEFINE_STATIC_LOCAL(NativeThemeChromeos, s_native_theme, ()); |
| 244 return &s_native_theme; | 244 return &s_native_theme; |
| 245 } | 245 } |
| 246 | 246 |
| 247 NativeThemeChromeos::NativeThemeChromeos() { | 247 NativeThemeChromeos::NativeThemeChromeos() { |
| 248 } | 248 } |
| 249 | 249 |
| 250 NativeThemeChromeos::~NativeThemeChromeos() { | 250 NativeThemeChromeos::~NativeThemeChromeos() { |
| 251 } | 251 } |
| 252 | 252 |
| 253 gfx::Size NativeThemeChromeos::GetPartSize(Part part, | 253 gfx::Size NativeThemeChromeos::GetPartSize(Part part, |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 757 | 757 |
| 758 if (stroke_border) { | 758 if (stroke_border) { |
| 759 SkPaint stroke_paint; | 759 SkPaint stroke_paint; |
| 760 GetStrokePaint(state, &stroke_paint); | 760 GetStrokePaint(state, &stroke_paint); |
| 761 canvas->drawPath(border, stroke_paint); | 761 canvas->drawPath(border, stroke_paint); |
| 762 } | 762 } |
| 763 } | 763 } |
| 764 | 764 |
| 765 } // namespace gfx | 765 } // namespace gfx |
| 766 | 766 |
| OLD | NEW |