OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/ui/views/apps/app_window_native_widget_mac.h" | |
6 | |
7 #import <Cocoa/Cocoa.h> | |
8 | |
9 #import "ui/base/cocoa/window_size_constants.h" | |
10 #import "ui/views/cocoa/native_widget_mac_nswindow.h" | |
11 | |
12 AppWindowNativeWidgetMac::AppWindowNativeWidgetMac(views::Widget* widget) | |
13 : NativeWidgetMac(widget) { | |
14 } | |
15 | |
16 AppWindowNativeWidgetMac::~AppWindowNativeWidgetMac() { | |
17 } | |
18 | |
19 NSWindow* AppWindowNativeWidgetMac::CreateNSWindow( | |
20 views::Widget::InitParams params) { | |
21 if (!params.remove_standard_frame) | |
tapted
2015/03/18 00:06:39
comment about this? (i.e. what native app window w
jackhou1
2015/03/18 03:44:39
Done.
| |
22 return NativeWidgetMac::CreateNSWindow(params); | |
23 | |
24 NSUInteger style_mask = NSTexturedBackgroundWindowMask | NSTitledWindowMask | | |
tapted
2015/03/18 00:06:38
comment why NSTexturedBackgroundWindowMask is need
jackhou1
2015/03/18 03:44:39
Done.
| |
25 NSClosableWindowMask | NSMiniaturizableWindowMask | | |
26 NSResizableWindowMask; | |
27 return [[NativeWidgetMacFramelessNSWindow alloc] | |
28 initWithContentRect:ui::kWindowSizeDeterminedLater | |
29 styleMask:style_mask | |
30 backing:NSBackingStoreBuffered | |
31 defer:YES]; | |
tapted
2015/03/18 00:06:39
Returns from functions are typically autoreleased
jackhou1
2015/03/18 03:44:39
Done.
| |
32 } | |
OLD | NEW |