Chromium Code Reviews| Index: chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm |
| diff --git a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm |
| index ecb10c0b1b6af5a339dfe71b3c331b4a6363862f..3843f47a71797bbe040f71938f239f6ff7e4a501 100644 |
| --- a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm |
| +++ b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm |
| @@ -223,9 +223,7 @@ std::vector<gfx::Rect> CalculateNonDraggableRegions( |
| @end |
| @interface ShellCustomFrameNSWindow : ShellNSWindow |
| - |
| - (void)drawCustomFrameRect:(NSRect)rect forView:(NSView*)view; |
| - |
| @end |
| @implementation ShellCustomFrameNSWindow |
| @@ -248,12 +246,14 @@ std::vector<gfx::Rect> CalculateNonDraggableRegions( |
| @end |
| -@interface ShellFramelessNSWindow : ShellCustomFrameNSWindow |
| - |
| +@interface ShellFramelessNSWindow : ShellNSWindow |
| +- (void)drawCustomFrameRect:(NSRect)rect forView:(NSView*)view; |
|
tapted
2014/05/29 03:35:28
I'd move this up into the ShellNSWindow interface
jackhou1
2014/05/29 04:09:40
ShellNSWindow is used to draw native frames, so it
|
| @end |
| @implementation ShellFramelessNSWindow |
| +- (void)drawCustomFrameRect:(NSRect)rect forView:(NSView*)view {} |
| + |
| + (NSRect)frameRectForContentRect:(NSRect)contentRect |
| styleMask:(NSUInteger)mask { |
| return contentRect; |
| @@ -373,14 +373,10 @@ NativeAppWindowCocoa::NativeAppWindowCocoa( |
| NSUInteger NativeAppWindowCocoa::GetWindowStyleMask() const { |
| NSUInteger style_mask = NSTitledWindowMask | NSClosableWindowMask | |
| - NSMiniaturizableWindowMask; |
| + NSMiniaturizableWindowMask | |
| + NSTexturedBackgroundWindowMask; |
|
tapted
2014/05/29 03:35:28
The documentation suggests that adding this has a
jackhou1
2014/05/29 04:09:40
Yeah, and I think this only applies for native fra
|
| if (shows_resize_controls_) |
| style_mask |= NSResizableWindowMask; |
| - if (!has_frame_ || |
| - !CommandLine::ForCurrentProcess()->HasSwitch( |
| - switches::kAppsUseNativeFrame)) { |
| - style_mask |= NSTexturedBackgroundWindowMask; |
| - } |
| return style_mask; |
| } |