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

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

Issue 2351183003: [Mac] Avoid "adding unknown subview" warning. (Closed)
Patch Set: Address feedback. 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
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_view.mm ('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_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..714dd954e318e3cb9ae157517a53b3d03d56c3b5 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::IsAtMostOS10_10()) {
+ [rootView addSubview:visualEffectView
+ positioned:NSWindowBelow
+ relativeTo:nil];
+ } else {
+ [[window contentView] addSubview:visualEffectView];
+ }
// Make the |tabStripBackgroundView_| a child of the NSVisualEffectView.
[tabStripBackgroundView_ setFrame:[visualEffectView bounds]];
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_view.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698