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:
parent
2ad762e075
commit
3536d4976a
8 changed files with 35 additions and 35 deletions
|
@ -31,6 +31,7 @@
|
|||
#include "shell/browser/ui/views/root_view.h"
|
||||
#include "shell/browser/web_contents_preferences.h"
|
||||
#include "shell/browser/web_view_manager.h"
|
||||
#include "shell/browser/window_list.h"
|
||||
#include "shell/common/electron_constants.h"
|
||||
#include "shell/common/gin_converters/image_converter.h"
|
||||
#include "shell/common/gin_helper/arguments.h"
|
||||
|
@ -532,11 +533,16 @@ void NativeWindowViews::SetContentView(views::View* view) {
|
|||
root_view_.GetMainView()->DeprecatedLayoutImmediately();
|
||||
}
|
||||
|
||||
void NativeWindowViews::CloseImpl() {
|
||||
void NativeWindowViews::Close() {
|
||||
if (!IsClosable()) {
|
||||
WindowList::WindowCloseCancelled(this);
|
||||
return;
|
||||
}
|
||||
|
||||
widget()->Close();
|
||||
}
|
||||
|
||||
void NativeWindowViews::CloseImmediatelyImpl() {
|
||||
void NativeWindowViews::CloseImmediately() {
|
||||
widget()->CloseNow();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue