2018-04-19 15:36:14 +09: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 12:19:40 -08:00
|
|
|
#include "shell/browser/ui/cocoa/electron_native_widget_mac.h"
|
2018-04-19 15:36:14 +09:00
|
|
|
|
2020-02-04 12:19:40 -08:00
|
|
|
#include "shell/browser/ui/cocoa/electron_ns_window.h"
|
2018-04-24 17:23:08 +09:00
|
|
|
|
2019-06-19 14:23:04 -07:00
|
|
|
namespace electron {
|
2018-04-19 15:36:14 +09:00
|
|
|
|
2020-02-04 12:19:40 -08:00
|
|
|
ElectronNativeWidgetMac::ElectronNativeWidgetMac(
|
2018-05-02 21:28:28 +09:00
|
|
|
NativeWindowMac* shell,
|
2018-04-24 17:23:08 +09:00
|
|
|
NSUInteger style_mask,
|
2018-04-19 15:36:14 +09:00
|
|
|
views::internal::NativeWidgetDelegate* delegate)
|
2018-04-24 17:23:08 +09:00
|
|
|
: views::NativeWidgetMac(delegate),
|
2018-05-02 21:28:28 +09:00
|
|
|
shell_(shell),
|
2018-04-24 17:23:08 +09:00
|
|
|
style_mask_(style_mask) {}
|
2018-04-19 15:36:14 +09:00
|
|
|
|
2021-06-03 21:16:13 -07:00
|
|
|
ElectronNativeWidgetMac::~ElectronNativeWidgetMac() = default;
|
2018-04-19 15:36:14 +09:00
|
|
|
|
2020-02-04 12:19:40 -08:00
|
|
|
NativeWidgetMacNSWindow* ElectronNativeWidgetMac::CreateNSWindow(
|
2019-05-22 12:56:21 -07:00
|
|
|
const remote_cocoa::mojom::CreateWindowParams* params) {
|
2020-02-04 12:19:40 -08:00
|
|
|
return [[[ElectronNSWindow alloc] initWithShell:shell_
|
|
|
|
styleMask:style_mask_] autorelease];
|
2018-04-19 15:36:14 +09:00
|
|
|
}
|
|
|
|
|
2019-06-19 14:23:04 -07:00
|
|
|
} // namespace electron
|