Move closing logic to api::BrowserWindow

Closing a BrowserWindow is essentially closing a WebContents, the logic
should not be in NativeWindow.
This commit is contained in:
Cheng Zhao 2018-02-22 16:52:08 +09:00
parent 66fab65a1a
commit aa3eafcea1
8 changed files with 103 additions and 143 deletions

View file

@ -93,7 +93,7 @@ void WindowList::CloseAllWindows() {
void WindowList::DestroyAllWindows() {
WindowVector windows = GetInstance()->windows_;
for (const auto& window : windows)
window->CloseContents(nullptr); // e.g. Destroy()
window->CloseImmediately(); // e.g. Destroy()
}
WindowList::WindowList() {