2018-04-19 06:36:14 +00:00
|
|
|
// Copyright (c) 2018 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2019-06-19 20:46:59 +00:00
|
|
|
#include "shell/browser/ui/cocoa/atom_native_widget_mac.h"
|
2018-04-19 06:36:14 +00:00
|
|
|
|
2019-06-19 20:46:59 +00:00
|
|
|
#include "shell/browser/ui/cocoa/atom_ns_window.h"
|
2018-04-24 08:23:08 +00:00
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
namespace electron {
|
2018-04-19 06:36:14 +00:00
|
|
|
|
|
|
|
AtomNativeWidgetMac::AtomNativeWidgetMac(
|
2018-05-02 12:28:28 +00:00
|
|
|
NativeWindowMac* shell,
|
2018-04-24 08:23:08 +00:00
|
|
|
NSUInteger style_mask,
|
2018-04-19 06:36:14 +00:00
|
|
|
views::internal::NativeWidgetDelegate* delegate)
|
2018-04-24 08:23:08 +00:00
|
|
|
: views::NativeWidgetMac(delegate),
|
2018-05-02 12:28:28 +00:00
|
|
|
shell_(shell),
|
2018-04-24 08:23:08 +00:00
|
|
|
style_mask_(style_mask) {}
|
2018-04-19 06:36:14 +00:00
|
|
|
|
2018-04-20 18:47:04 +00:00
|
|
|
AtomNativeWidgetMac::~AtomNativeWidgetMac() {}
|
2018-04-19 06:36:14 +00:00
|
|
|
|
2018-04-19 07:01:19 +00:00
|
|
|
NativeWidgetMacNSWindow* AtomNativeWidgetMac::CreateNSWindow(
|
2019-05-22 19:56:21 +00:00
|
|
|
const remote_cocoa::mojom::CreateWindowParams* params) {
|
2019-05-01 19:27:55 +00:00
|
|
|
return [[[AtomNSWindow alloc] initWithShell:shell_
|
|
|
|
styleMask:style_mask_] autorelease];
|
2018-04-19 06:36:14 +00:00
|
|
|
}
|
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
} // namespace electron
|