Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / cocoa / framed_browser_window.mm
index b916e46..0989b6a 100644 (file)
@@ -36,7 +36,7 @@ const CGFloat kWindowGradientHeight = 24.0;
 
 }
 
-@interface FramedBrowserWindow ()
+@interface FramedBrowserWindow (Private)
 
 - (void)adjustCloseButton:(NSNotification*)notification;
 - (void)adjustMiniaturizeButton:(NSNotification*)notification;
@@ -252,18 +252,11 @@ const CGFloat kWindowGradientHeight = 24.0;
 }
 
 - (void)setShouldHideTitle:(BOOL)flag {
-  if ([self respondsToSelector:@selector(setTitleVisibility:)])
-    self.titleVisibility = flag ? NSWindowTitleHidden : NSWindowTitleVisible;
-  else
-    shouldHideTitle_ = flag;
+  shouldHideTitle_ = flag;
 }
 
 - (BOOL)_isTitleHidden {
-  // Only intervene with 10.6-10.9.
-  if ([self respondsToSelector:@selector(setTitleVisibility:)])
-    return [super _isTitleHidden];
-  else
-    return shouldHideTitle_;
+  return shouldHideTitle_;
 }
 
 - (CGFloat)windowButtonsInterButtonSpacing {
@@ -356,12 +349,9 @@ const CGFloat kWindowGradientHeight = 24.0;
                           bounds:windowRect
             forceBlackBackground:NO];
 
-  // In Yosemite: The title is drawn by a subview and not painted on. Therefore,
-  // never worry about drawing it. Pre-Yosemite: If the window needs a title and
-  // we painted over the title as drawn by the default window paint, paint it
-  // ourselves.
-  if (![self respondsToSelector:@selector(setTitleVisibility:)] &&
-      themed && [view respondsToSelector:@selector(_titlebarTitleRect)] &&
+  // If the window needs a title and we painted over the title as drawn by the
+  // default window paint, paint it ourselves.
+  if (themed && [view respondsToSelector:@selector(_titlebarTitleRect)] &&
       [view respondsToSelector:@selector(_drawTitleStringIn:withColor:)] &&
       ![self _isTitleHidden]) {
     [view _drawTitleStringIn:[view _titlebarTitleRect]