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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_view.mm

Issue 2074933006: Mac: Disable visual effects when fullscreen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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 | « chrome/browser/ui/cocoa/tabs/tab_strip_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/tabs/tab_strip_view.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm
index 8334d31dd830815a074bd3be78df351dac30b8f8..a92605484adbb3cd41ccd7736830c54995ff7690 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm
@@ -402,7 +402,19 @@ - (void)setController:(TabStripController*)controller {
- (void)windowDidChangeTheme {
[self setNeedsDisplay:YES];
+ [self updateVisualEffectState];
+}
+
+- (void)windowDidChangeActive {
+ [self setNeedsDisplay:YES];
+}
+
+- (void)setVisualEffectsDisabledForFullscreen:(BOOL)disabled {
+ visualEffectsDisabledForFullscreen_ = disabled;
+ [self updateVisualEffectState];
+}
+- (void)updateVisualEffectState {
// Configure the NSVisualEffectView so that it does nothing if the user has
// switched to a custom theme, or uses vibrancy if the user has switched back
// to the default theme.
@@ -411,8 +423,8 @@ - (void)windowDidChangeTheme {
if (!visualEffectView || !themeProvider) {
return;
}
-
- if (themeProvider->HasCustomImage(IDR_THEME_FRAME) ||
+ if (visualEffectsDisabledForFullscreen_ ||
+ themeProvider->HasCustomImage(IDR_THEME_FRAME) ||
themeProvider->HasCustomColor(ThemeProperties::COLOR_FRAME)) {
[visualEffectView setState:NSVisualEffectStateInactive];
} else {
@@ -420,8 +432,4 @@ - (void)windowDidChangeTheme {
}
}
-- (void)windowDidChangeActive {
- [self setNeedsDisplay:YES];
-}
-
@end
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698