fix: revert moving IsClosed() and IsClosable() into NativeWindow::Close() (#47482)

Revert "refactor: move `IsClosed()` and `IsClosable()` tests into `NativeWindow::Close()` (#46888)"

This reverts commit 3faddd5ae2.
This commit is contained in:
Keeley Hammond 2025-06-16 16:41:19 -07:00 committed by GitHub
commit 3536d4976a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 35 additions and 35 deletions

View file

@ -81,10 +81,9 @@ class NativeWindow : public base::SupportsUserData,
virtual void SetContentView(views::View* view) = 0;
// wrapper around CloseImpl that checks that window_ can be closed
void Close();
// wrapper around CloseImmediatelyImpl that checks that window_ can be closed
void CloseImmediately();
virtual void Close() = 0;
virtual void CloseImmediately() = 0;
virtual bool IsClosed() const;
virtual void Focus(bool focus) = 0;
virtual bool IsFocused() const = 0;
virtual void Show() = 0;
@ -427,6 +426,8 @@ class NativeWindow : public base::SupportsUserData,
void UpdateBackgroundThrottlingState();
protected:
friend class api::BrowserView;
NativeWindow(const gin_helper::Dictionary& options, NativeWindow* parent);
void set_titlebar_overlay_height(int height) {
@ -457,9 +458,6 @@ class NativeWindow : public base::SupportsUserData,
void set_content_view(views::View* view) { content_view_ = view; }
virtual void CloseImpl() = 0;
virtual void CloseImmediatelyImpl() = 0;
static inline constexpr base::cstring_view kNativeWindowKey =
"__ELECTRON_NATIVE_WINDOW__";