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

Unified Diff: chrome/browser/ui/cocoa/browser_window_layout.mm

Issue 2404783002: [Mac] Avoid "adding unknown subview" warning. (Closed)
Patch Set: Merged with head Created 4 years, 2 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/browser_window_layout.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_layout.mm b/chrome/browser/ui/cocoa/browser_window_layout.mm
index 5afd82c0ce3297fa07cc9407a03b4620eedb37cb..153a8d5610b1de49bcea3c88e141e6c34859fcfc 100644
--- a/chrome/browser/ui/cocoa/browser_window_layout.mm
+++ b/chrome/browser/ui/cocoa/browser_window_layout.mm
@@ -17,6 +17,16 @@ namespace chrome {
// The height of the tab strip.
const CGFloat kTabStripHeight = 37;
+bool ShouldUseFullSizeContentView() {
+ // Prior to macOS 10.11 Chrome has added a subview above the window's content
+ // view, which the Appkit warns about at runtime. This was done to make sure
+ // that window buttons are always displayed above the content. Presumably,
+ // doing so may break in a future macOS release. Using
+ // NSFullSizeContentViewWindowMask makes window buttons displayed inside
+ // the titlebar, so they are not covered by the content view.
+ return base::mac::IsAtLeastOS10_11();
+}
+
} // namespace chrome
namespace {

Powered by Google App Engine
This is Rietveld 408576698