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

Unified Diff: chrome/browser/ui/cocoa/themed_window.mm

Issue 15240002: Cross-platform DefaultThemeProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix views build issues. Created 7 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/themed_window.mm
diff --git a/chrome/browser/ui/cocoa/themed_window.mm b/chrome/browser/ui/cocoa/themed_window.mm
index 911bf8af007eb2e69faa27750b18e480b6201b6b..55e9ca32dead7ae60a12ead96f9e14d5eee1afe4 100644
--- a/chrome/browser/ui/cocoa/themed_window.mm
+++ b/chrome/browser/ui/cocoa/themed_window.mm
@@ -4,12 +4,23 @@
#import "chrome/browser/ui/cocoa/themed_window.h"
+#include "base/lazy_instance.h"
+#include "ui/base/default_theme_provider.h"
+
+namespace {
+
+// 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/
+base::LazyInstance<ui::DefaultThemeProvider>::Leaky
+ g_defaultThemeProvider = LAZY_INSTANCE_INITIALIZER;
+
+} // namespace
+
// Default implementations; used mostly for tests so that the hosting windows
// don't needs to know about the theming machinery.
@implementation NSWindow (ThemeProvider)
- (ThemeProvider*)themeProvider {
- return NULL;
+ return &(g_defaultThemeProvider.Get());
}
- (ThemedWindowStyle)themedWindowStyle {
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698