linux: Implement win.setParentWindow(parent)

This commit is contained in:
Cheng Zhao 2016-06-19 15:47:27 +09:00
parent 4c3c4437da
commit f4bec78ccb
10 changed files with 55 additions and 7 deletions

View file

@ -403,6 +403,9 @@ void NativeWindow::CloseContents(content::WebContents* source) {
inspectable_web_contents_ = nullptr;
Observe(nullptr);
FOR_EACH_OBSERVER(NativeWindowObserver, observers_,
WillDestoryNativeObject());
// When the web contents is gone, close the window immediately, but the
// memory will not be freed until you call delete.
// In this way, it would be safe to manage windows via smart pointers. If you