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

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

Issue 2351183003: [Mac] Avoid "adding unknown subview" warning. (Closed)
Patch Set: Created 4 years, 3 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
Index: chrome/browser/ui/cocoa/tabs/tab_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm
index e8465ef4a9b2b78128128a98cc057b19917586c3..a7feb96f83baed912919e358b4841e2055eab527 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm
@@ -395,9 +395,13 @@
[visualEffectView setBlendingMode:NSVisualEffectBlendingModeBehindWindow];
[visualEffectView setState:NSVisualEffectStateFollowsWindowActiveState];
- [rootView addSubview:visualEffectView
- positioned:NSWindowBelow
- relativeTo:nil];
+ if (base::mac::IsAtLeastOS10_10()) {
erikchen 2016/09/20 23:07:47 This CL contains references to both IsAtMost 10.10
shrike 2016/09/20 23:27:17 I'm finding this isAtLeast/IsAtMost confusing. I b
+ [[window contentView] addSubview:visualEffectView];
+ } else {
+ [rootView addSubview:visualEffectView
+ positioned:NSWindowBelow
+ relativeTo:nil];
+ }
// Make the |tabStripBackgroundView_| a child of the NSVisualEffectView.
[tabStripBackgroundView_ setFrame:[visualEffectView bounds]];

Powered by Google App Engine
This is Rietveld 408576698