1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #import "chrome/browser/ui/cocoa/chrome_browser_window.h" 6 7 #include "base/logging.h" 8 #import "chrome/browser/ui/cocoa/themed_window.h" 9 #include "ui/base/theme_provider.h" 10 11 @implementation ChromeBrowserWindow 12 13 - (ui::ThemeProvider*)themeProvider { 14 id delegate = [self delegate]; 15 if (![delegate respondsToSelector:@selector(themeProvider)]) 16 return NULL; 17 return [delegate themeProvider]; 18 } 19 20 - (ThemedWindowStyle)themedWindowStyle { 21 id delegate = [self delegate]; 22 if (![delegate respondsToSelector:@selector(themedWindowStyle)]) 23 return THEMED_NORMAL; 24 return [delegate themedWindowStyle]; 25 } 26 27 - (NSPoint)themePatternPhaseForAlignment:(ThemePatternAlignment)alignment { 28 id delegate = [self delegate]; 29 if (![delegate respondsToSelector:@selector(themePatternPhaseForAlignment:)]) 30 return NSZeroPoint; 31 return [delegate themePatternPhaseForAlignment:alignment]; 32 } 33 34 @end 35