OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #import "chrome/browser/ui/cocoa/themed_window.h" | 5 #import "chrome/browser/ui/cocoa/themed_window.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | |
8 #include "ui/base/default_theme_provider.h" | |
9 | |
10 namespace { | |
11 | |
12 // Whether to allow NSExceptions to be raised on the current thread. | |
Robert Sesek
2013/05/17 14:06:37
?
groby-ooo-7-16
2013/05/17 23:52:57
Overzealous copy/paste on a late night :(
On 2013/
| |
13 base::LazyInstance<ui::DefaultThemeProvider>::Leaky | |
14 g_defaultThemeProvider = LAZY_INSTANCE_INITIALIZER; | |
15 | |
16 } // namespace | |
17 | |
7 // Default implementations; used mostly for tests so that the hosting windows | 18 // Default implementations; used mostly for tests so that the hosting windows |
8 // don't needs to know about the theming machinery. | 19 // don't needs to know about the theming machinery. |
9 @implementation NSWindow (ThemeProvider) | 20 @implementation NSWindow (ThemeProvider) |
10 | 21 |
11 - (ThemeProvider*)themeProvider { | 22 - (ThemeProvider*)themeProvider { |
12 return NULL; | 23 return &(g_defaultThemeProvider.Get()); |
13 } | 24 } |
14 | 25 |
15 - (ThemedWindowStyle)themedWindowStyle { | 26 - (ThemedWindowStyle)themedWindowStyle { |
16 return THEMED_NORMAL; | 27 return THEMED_NORMAL; |
17 } | 28 } |
18 | 29 |
19 - (NSPoint)themePatternPhase { | 30 - (NSPoint)themePatternPhase { |
20 return NSZeroPoint; | 31 return NSZeroPoint; |
21 } | 32 } |
22 | 33 |
23 @end | 34 @end |
OLD | NEW |