| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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/tabs/tab_strip_view.h" | 5 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" |
| 6 | 6 |
| 7 #include <cmath> // floor | 7 #include <cmath> // floor |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/mac/foundation_util.h" | 10 #include "base/mac/foundation_util.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // somewhat opaque for Incognito mode, very opaque for non-Incognito mode, and | 125 // somewhat opaque for Incognito mode, very opaque for non-Incognito mode, and |
| 126 // completely opaque when the window is not active. | 126 // completely opaque when the window is not active. |
| 127 if (themeProvider && !hasCustomThemeImage && isModeMaterial && | 127 if (themeProvider && !hasCustomThemeImage && isModeMaterial && |
| 128 !inATabDraggingOverlayWindow_) { | 128 !inATabDraggingOverlayWindow_) { |
| 129 NSColor* theColor = nil; | 129 NSColor* theColor = nil; |
| 130 if (isMainWindow) { | 130 if (isMainWindow) { |
| 131 if (supportsVibrancy && | 131 if (supportsVibrancy && |
| 132 !themeProvider->HasCustomColor(ThemeProperties::COLOR_FRAME)) { | 132 !themeProvider->HasCustomColor(ThemeProperties::COLOR_FRAME)) { |
| 133 theColor = themeProvider->GetNSColor( | 133 theColor = themeProvider->GetNSColor( |
| 134 ThemeProperties::COLOR_FRAME_VIBRANCY_OVERLAY); | 134 ThemeProperties::COLOR_FRAME_VIBRANCY_OVERLAY); |
| 135 } else if (!supportsVibrancy && themeProvider->InIncognitoMode()) { |
| 136 theColor = [NSColor colorWithSRGBRed:20 / 255. |
| 137 green:22 / 255. |
| 138 blue:24 / 255. |
| 139 alpha:1]; |
| 135 } else { | 140 } else { |
| 136 theColor = themeProvider->GetNSColor(ThemeProperties::COLOR_FRAME); | 141 theColor = themeProvider->GetNSColor(ThemeProperties::COLOR_FRAME); |
| 137 } | 142 } |
| 138 } else { | 143 } else { |
| 139 theColor = themeProvider->GetNSColor( | 144 theColor = themeProvider->GetNSColor( |
| 140 ThemeProperties::COLOR_FRAME_INACTIVE); | 145 ThemeProperties::COLOR_FRAME_INACTIVE); |
| 141 } | 146 } |
| 142 | 147 |
| 143 if (theColor) { | 148 if (theColor) { |
| 144 [theColor set]; | 149 [theColor set]; |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 } else { | 418 } else { |
| 414 [visualEffectView setState:NSVisualEffectStateFollowsWindowActiveState]; | 419 [visualEffectView setState:NSVisualEffectStateFollowsWindowActiveState]; |
| 415 } | 420 } |
| 416 } | 421 } |
| 417 | 422 |
| 418 - (void)windowDidChangeActive { | 423 - (void)windowDidChangeActive { |
| 419 [self setNeedsDisplay:YES]; | 424 [self setNeedsDisplay:YES]; |
| 420 } | 425 } |
| 421 | 426 |
| 422 @end | 427 @end |
| OLD | NEW |