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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_window_controller.h" 5 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "base/mac/sdk_forward_declarations.h" 8 #import "base/mac/sdk_forward_declarations.h"
9 #import "chrome/browser/ui/cocoa/browser_window_layout.h" 9 #import "chrome/browser/ui/cocoa/browser_window_layout.h"
10 #import "chrome/browser/ui/cocoa/fast_resize_view.h" 10 #import "chrome/browser/ui/cocoa/fast_resize_view.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 // the start of -[BrowserWindowController initWithBrowser:takeOwnership:], 388 // the start of -[BrowserWindowController initWithBrowser:takeOwnership:],
389 // before the |browser_| ivar has been set. Without a browser object we 389 // before the |browser_| ivar has been set. Without a browser object we
390 // can't check the window's theme. The final setup happens in 390 // can't check the window's theme. The final setup happens in
391 // -[TabStripView setController:], at which point we have access to the theme. 391 // -[TabStripView setController:], at which point we have access to the theme.
392 [visualEffectView setAppearance: 392 [visualEffectView setAppearance:
393 [NSAppearance appearanceNamed:NSAppearanceNameVibrantLight]]; 393 [NSAppearance appearanceNamed:NSAppearanceNameVibrantLight]];
394 [visualEffectView setMaterial:NSVisualEffectMaterialLight]; 394 [visualEffectView setMaterial:NSVisualEffectMaterialLight];
395 [visualEffectView setBlendingMode:NSVisualEffectBlendingModeBehindWindow]; 395 [visualEffectView setBlendingMode:NSVisualEffectBlendingModeBehindWindow];
396 [visualEffectView setState:NSVisualEffectStateFollowsWindowActiveState]; 396 [visualEffectView setState:NSVisualEffectStateFollowsWindowActiveState];
397 397
398 [rootView addSubview:visualEffectView 398 if (base::mac::IsAtMostOS10_10()) {
399 positioned:NSWindowBelow 399 [rootView addSubview:visualEffectView
400 relativeTo:nil]; 400 positioned:NSWindowBelow
401 relativeTo:nil];
402 } else {
403 [[window contentView] addSubview:visualEffectView];
404 }
401 405
402 // Make the |tabStripBackgroundView_| a child of the NSVisualEffectView. 406 // Make the |tabStripBackgroundView_| a child of the NSVisualEffectView.
403 [tabStripBackgroundView_ setFrame:[visualEffectView bounds]]; 407 [tabStripBackgroundView_ setFrame:[visualEffectView bounds]];
404 [visualEffectView addSubview:tabStripBackgroundView_]; 408 [visualEffectView addSubview:tabStripBackgroundView_];
405 } 409 }
406 410
407 // Called when the size of the window content area has changed. Override to 411 // Called when the size of the window content area has changed. Override to
408 // position specific views. Base class implementation does nothing. 412 // position specific views. Base class implementation does nothing.
409 - (void)layoutSubviews { 413 - (void)layoutSubviews {
410 NOTIMPLEMENTED(); 414 NOTIMPLEMENTED();
411 } 415 }
412 416
413 @end 417 @end
OLDNEW
« 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