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.
|
|
|
|
|
2020-02-04 20:19:40 +00:00
|
|
|
#include "shell/browser/ui/cocoa/electron_native_widget_mac.h"
|
2018-04-19 06:36:14 +00:00
|
|
|
|
2020-02-04 20:19:40 +00:00
|
|
|
#include "shell/browser/ui/cocoa/electron_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
|
|
|
|
2020-02-04 20:19:40 +00:00
|
|
|
ElectronNativeWidgetMac::ElectronNativeWidgetMac(
|
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
|
|
|
|
2020-02-04 20:19:40 +00:00
|
|
|
ElectronNativeWidgetMac::~ElectronNativeWidgetMac() {}
|
2018-04-19 06:36:14 +00:00
|
|
|
|
2020-02-04 20:19:40 +00:00
|
|
|
NativeWidgetMacNSWindow* ElectronNativeWidgetMac::CreateNSWindow(
|
2019-05-22 19:56:21 +00:00
|
|
|
const remote_cocoa::mojom::CreateWindowParams* params) {
|
2020-02-04 20:19:40 +00:00
|
|
|
return [[[ElectronNSWindow 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
|