} else {
// Unlike Quit(), we do not ask to close window, but destroy the window
// without asking.
- for (NativeWindow* window : *window_list)
- window->CloseContents(nullptr); // e.g. Destroy()
+ atom::WindowList::DestroyAllWindows();
}
}
}
window->Close();
}
+// static
+void WindowList::DestroyAllWindows() {
+ WindowVector windows = GetInstance()->windows_;
+ for (const auto& window : windows)
+ window->CloseContents(nullptr); // e.g. Destroy()
+}
+
WindowList::WindowList() {
}
// Closes all windows.
static void CloseAllWindows();
+ // Destroy all windows.
+ static void DestroyAllWindows();
+
private:
WindowList();
~WindowList();