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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_strip.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) 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
OLDNEW
« 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