Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: ui/gfx/native_theme_chromeos.cc

Issue 8520026: Fix statics in NativeTheme*::instance() to avoid destruction post main (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/native_theme_aura.cc ('k') | ui/gfx/native_theme_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/basictypes.h"
7 #include "base/logging.h" 8 #include "base/logging.h"
8 #include "grit/gfx_resources.h" 9 #include "grit/gfx_resources.h"
9 #include "third_party/skia/include/effects/SkGradientShader.h" 10 #include "third_party/skia/include/effects/SkGradientShader.h"
10 #include "third_party/skia/include/core/SkPaint.h" 11 #include "third_party/skia/include/core/SkPaint.h"
11 #include "third_party/skia/include/core/SkPath.h" 12 #include "third_party/skia/include/core/SkPath.h"
12 #include "third_party/skia/include/core/SkShader.h" 13 #include "third_party/skia/include/core/SkShader.h"
13 #include "ui/base/resource/resource_bundle.h" 14 #include "ui/base/resource/resource_bundle.h"
14 #include "ui/gfx/insets.h" 15 #include "ui/gfx/insets.h"
15 #include "ui/gfx/rect.h" 16 #include "ui/gfx/rect.h"
16 #include "ui/gfx/size.h" 17 #include "ui/gfx/size.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 233
233 namespace gfx { 234 namespace gfx {
234 235
235 // static 236 // static
236 const NativeTheme* NativeTheme::instance() { 237 const NativeTheme* NativeTheme::instance() {
237 return NativeThemeChromeos::instance(); 238 return NativeThemeChromeos::instance();
238 } 239 }
239 240
240 // static 241 // static
241 const NativeThemeChromeos* NativeThemeChromeos::instance() { 242 const NativeThemeChromeos* NativeThemeChromeos::instance() {
242 // The global NativeThemeChromeos instance.
243 CR_DEFINE_STATIC_LOCAL(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
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « ui/gfx/native_theme_aura.cc ('k') | ui/gfx/native_theme_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698