2020-02-04 20:19:40 +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.
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NATIVE_WIDGET_MAC_H_
|
|
|
|
#define ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NATIVE_WIDGET_MAC_H_
|
2020-02-04 20:19:40 +00:00
|
|
|
|
2022-06-14 16:24:52 +00:00
|
|
|
#include <string>
|
|
|
|
|
2023-06-13 18:45:48 +00:00
|
|
|
#include "base/memory/raw_ptr.h"
|
2020-02-04 20:19:40 +00:00
|
|
|
#include "ui/views/widget/native_widget_mac.h"
|
|
|
|
|
|
|
|
namespace electron {
|
|
|
|
|
|
|
|
class NativeWindowMac;
|
|
|
|
|
|
|
|
class ElectronNativeWidgetMac : public views::NativeWidgetMac {
|
|
|
|
public:
|
|
|
|
ElectronNativeWidgetMac(NativeWindowMac* shell,
|
2022-06-14 16:24:52 +00:00
|
|
|
const std::string& window_type,
|
2020-02-04 20:19:40 +00:00
|
|
|
NSUInteger style_mask,
|
|
|
|
views::internal::NativeWidgetDelegate* delegate);
|
|
|
|
~ElectronNativeWidgetMac() override;
|
|
|
|
|
2021-11-03 11:41:45 +00:00
|
|
|
// disable copy
|
|
|
|
ElectronNativeWidgetMac(const ElectronNativeWidgetMac&) = delete;
|
|
|
|
ElectronNativeWidgetMac& operator=(const ElectronNativeWidgetMac&) = delete;
|
|
|
|
|
2020-02-04 20:19:40 +00:00
|
|
|
protected:
|
|
|
|
// NativeWidgetMac:
|
|
|
|
NativeWidgetMacNSWindow* CreateNSWindow(
|
|
|
|
const remote_cocoa::mojom::CreateWindowParams* params) override;
|
|
|
|
|
|
|
|
private:
|
2023-06-13 18:45:48 +00:00
|
|
|
raw_ptr<NativeWindowMac> shell_;
|
2022-06-14 16:24:52 +00:00
|
|
|
std::string window_type_;
|
2020-02-04 20:19:40 +00:00
|
|
|
NSUInteger style_mask_;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace electron
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NATIVE_WIDGET_MAC_H_
|