summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/browser_window_controller.mm
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-26 22:41:00 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-26 22:41:00 +0000
commit1c2b7b515d5e0304101cdac212d37bf5a554a38e (patch)
treecbf960ae1f276acae179c0b9a24b141bc901d6b0 /chrome/browser/cocoa/browser_window_controller.mm
parente505a900d371c2012fd32a6d763ae283a98f72a1 (diff)
downloadchromium_src-1c2b7b515d5e0304101cdac212d37bf5a554a38e.zip
chromium_src-1c2b7b515d5e0304101cdac212d37bf5a554a38e.tar.gz
chromium_src-1c2b7b515d5e0304101cdac212d37bf5a554a38e.tar.bz2
Finishing removal of GTMTheme. All incognito drawing is now correct, themed or not.
BUG=http://crbug.com/35554 ; http://crbug.com/18568 TEST=everything should still work, all themes should draw correctly Review URL: http://codereview.chromium.org/661206 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40173 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/browser_window_controller.mm')
-rw-r--r--chrome/browser/cocoa/browser_window_controller.mm20
1 files changed, 5 insertions, 15 deletions
diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm
index 547960d..f795ce9 100644
--- a/chrome/browser/cocoa/browser_window_controller.mm
+++ b/chrome/browser/cocoa/browser_window_controller.mm
@@ -194,8 +194,6 @@
if ([window respondsToSelector:@selector(setBottomCornerRounded:)])
[window setBottomCornerRounded:NO];
- [self setTheme];
-
// Get the most appropriate size for the window, then enforce the
// minimum width and height. The window shim will handle flipping
// the coordinates for us so we can use it to save some code.
@@ -1295,27 +1293,19 @@
}
- (void)userChangedTheme {
- [self setTheme];
- NSNotificationCenter* defaultCenter = [NSNotificationCenter defaultCenter];
- [defaultCenter postNotificationName:kGTMThemeDidChangeNotification
- object:theme_];
// TODO(dmaclach): Instead of redrawing the whole window, views that care
// about the active window state should be registering for notifications.
[[self window] setViewsNeedDisplay:YES];
}
-- (GTMTheme*)gtm_themeForWindow:(NSWindow*)window {
- return theme_ ? theme_ : [GTMTheme defaultTheme];
-}
-
-- (NSPoint)gtm_themePatternPhaseForWindow:(NSWindow*)window {
- return [self themePatternPhase];
-}
-
- (ThemeProvider*)themeProvider {
return browser_->profile()->GetThemeProvider();
}
+- (BOOL)themeIsIncognito {
+ return browser_->profile()->IsOffTheRecord();
+}
+
- (NSPoint)themePatternPhase {
// Our patterns want to be drawn from the upper left hand corner of the view.
// Cocoa wants to do it from the lower left of the window.
@@ -1324,7 +1314,7 @@
// will phase their patterns relative to this so all the views look right.
//
// To line up the background pattern with the pattern in the browser window
- // the background pattern for the tabs needs to be moved left by 5 pixels.
+ // the background pattern for the tabs needs to be moved left by 5 pixels.
const CGFloat kPatternHorizontalOffset = -5;
NSView* tabStripView = [self tabStripView];
NSRect tabStripViewWindowBounds = [tabStripView bounds];