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

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

Issue 13389002: Removes theming from popup windows on Mac (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased Created 7 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/framed_browser_window.mm
diff --git a/chrome/browser/ui/cocoa/framed_browser_window.mm b/chrome/browser/ui/cocoa/framed_browser_window.mm
index 5e398399c5495898bef9653fcfe366c4a0fa3e82..d53bd302967ae65bd435441d05bd03dc8a0dd963 100644
--- a/chrome/browser/ui/cocoa/framed_browser_window.mm
+++ b/chrome/browser/ui/cocoa/framed_browser_window.mm
@@ -412,21 +412,19 @@ const CGFloat kWindowGradientHeight = 24.0;
// Find a theme image.
NSColor* themeImageColor = nil;
- int themeImageID;
- if (popup && active)
- themeImageID = IDR_THEME_TOOLBAR;
- else if (popup && !active)
- themeImageID = IDR_THEME_TAB_BACKGROUND;
- else if (!popup && active && incognito)
- themeImageID = IDR_THEME_FRAME_INCOGNITO;
- else if (!popup && active && !incognito)
- themeImageID = IDR_THEME_FRAME;
- else if (!popup && !active && incognito)
- themeImageID = IDR_THEME_FRAME_INCOGNITO_INACTIVE;
- else
- themeImageID = IDR_THEME_FRAME_INACTIVE;
- if (themeProvider->HasCustomImage(IDR_THEME_FRAME))
- themeImageColor = themeProvider->GetNSImageColorNamed(themeImageID, true);
+ if (!popup) {
+ int themeImageID;
+ if (active && incognito)
+ themeImageID = IDR_THEME_FRAME_INCOGNITO;
+ else if (active && !incognito)
+ themeImageID = IDR_THEME_FRAME;
+ else if (!active && incognito)
+ themeImageID = IDR_THEME_FRAME_INCOGNITO_INACTIVE;
+ else
+ themeImageID = IDR_THEME_FRAME_INACTIVE;
+ if (themeProvider->HasCustomImage(IDR_THEME_FRAME))
+ themeImageColor = themeProvider->GetNSImageColorNamed(themeImageID, true);
+ }
// If no theme image, use a gradient if incognito.
NSGradient* gradient = nil;
@@ -514,21 +512,7 @@ const CGFloat kWindowGradientHeight = 24.0;
return [NSColor windowFrameTextColor];
ThemedWindowStyle windowStyle = [self themedWindowStyle];
- BOOL active = [self isMainWindow];
BOOL incognito = windowStyle & THEMED_INCOGNITO;
- BOOL popup = windowStyle & THEMED_POPUP;
-
- NSColor* titleColor = nil;
- if (popup && active) {
- titleColor = themeProvider->GetNSColor(
- ThemeProperties::COLOR_TAB_TEXT, false);
- } else if (popup && !active) {
- titleColor = themeProvider->GetNSColor(
- ThemeProperties::COLOR_BACKGROUND_TAB_TEXT, false);
- }
-
- if (titleColor)
- return titleColor;
if (incognito)
return [NSColor whiteColor];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698