зеркало из https://github.com/electron/electron.git
refactor: remove WindowListObserver::OnWindowAdded() (#42979)
refactor: remove WindowListObserver::OnWindowRemove() these have never been used
This commit is contained in:
Родитель
7a101a1c4b
Коммит
c72a714dd5
|
@ -51,9 +51,6 @@ void WindowList::AddWindow(NativeWindow* window) {
|
||||||
// Push |window| on the appropriate list instance.
|
// Push |window| on the appropriate list instance.
|
||||||
WindowVector& windows = GetInstance()->windows_;
|
WindowVector& windows = GetInstance()->windows_;
|
||||||
windows.push_back(window);
|
windows.push_back(window);
|
||||||
|
|
||||||
for (WindowListObserver& observer : GetObservers())
|
|
||||||
observer.OnWindowAdded(window);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
@ -61,9 +58,6 @@ void WindowList::RemoveWindow(NativeWindow* window) {
|
||||||
WindowVector& windows = GetInstance()->windows_;
|
WindowVector& windows = GetInstance()->windows_;
|
||||||
std::erase(windows, window);
|
std::erase(windows, window);
|
||||||
|
|
||||||
for (WindowListObserver& observer : GetObservers())
|
|
||||||
observer.OnWindowRemoved(window);
|
|
||||||
|
|
||||||
if (windows.empty()) {
|
if (windows.empty()) {
|
||||||
for (WindowListObserver& observer : GetObservers())
|
for (WindowListObserver& observer : GetObservers())
|
||||||
observer.OnWindowAllClosed();
|
observer.OnWindowAllClosed();
|
||||||
|
|
|
@ -13,12 +13,6 @@ class NativeWindow;
|
||||||
|
|
||||||
class WindowListObserver : public base::CheckedObserver {
|
class WindowListObserver : public base::CheckedObserver {
|
||||||
public:
|
public:
|
||||||
// Called immediately after a window is added to the list.
|
|
||||||
virtual void OnWindowAdded(NativeWindow* window) {}
|
|
||||||
|
|
||||||
// Called immediately after a window is removed from the list.
|
|
||||||
virtual void OnWindowRemoved(NativeWindow* window) {}
|
|
||||||
|
|
||||||
// Called when a window close is cancelled by beforeunload handler.
|
// Called when a window close is cancelled by beforeunload handler.
|
||||||
virtual void OnWindowCloseCancelled(NativeWindow* window) {}
|
virtual void OnWindowCloseCancelled(NativeWindow* window) {}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче