2018-04-19 07:01:19 +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_NS_WINDOW_DELEGATE_H_
|
|
|
|
#define ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_DELEGATE_H_
|
2018-04-19 07:01:19 +00:00
|
|
|
|
2018-04-19 07:41:36 +00:00
|
|
|
#include <Quartz/Quartz.h>
|
|
|
|
|
2023-06-13 18:45:48 +00:00
|
|
|
#include "base/memory/raw_ptr.h"
|
2019-05-15 22:04:23 +00:00
|
|
|
#include "components/remote_cocoa/app_shim/views_nswindow_delegate.h"
|
2021-06-02 02:37:10 +00:00
|
|
|
#include "third_party/abseil-cpp/absl/types/optional.h"
|
2018-04-19 07:01:19 +00:00
|
|
|
|
|
|
|
namespace electron {
|
|
|
|
class NativeWindowMac;
|
|
|
|
}
|
|
|
|
|
2018-09-19 11:10:26 +00:00
|
|
|
@interface ElectronNSWindowDelegate
|
|
|
|
: ViewsNSWindowDelegate <NSTouchBarDelegate, QLPreviewPanelDataSource> {
|
2018-04-19 07:01:19 +00:00
|
|
|
@private
|
2023-06-13 18:45:48 +00:00
|
|
|
raw_ptr<electron::NativeWindowMac> shell_;
|
2018-04-19 07:01:19 +00:00
|
|
|
bool is_zooming_;
|
|
|
|
int level_;
|
|
|
|
bool is_resizable_;
|
2021-06-02 02:37:10 +00:00
|
|
|
|
2023-07-26 08:10:34 +00:00
|
|
|
// Whether the window is currently minimized. Used to work
|
|
|
|
// around a macOS bug with child window minimization.
|
|
|
|
bool is_minimized_;
|
|
|
|
|
2021-06-02 02:37:10 +00:00
|
|
|
// Only valid during a live resize.
|
|
|
|
// Used to keep track of whether a resize is happening horizontally or
|
|
|
|
// vertically, even if physically the user is resizing in both directions.
|
|
|
|
absl::optional<bool> resizingHorizontally_;
|
2018-04-19 07:01:19 +00:00
|
|
|
}
|
|
|
|
- (id)initWithShell:(electron::NativeWindowMac*)shell;
|
|
|
|
@end
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_DELEGATE_H_
|