Correctly handle window's lifetime when it's closed.

This commit is contained in:
Cheng Zhao 2013-05-01 23:28:01 +08:00
parent 9e489cae0c
commit afe07521c5
7 changed files with 23 additions and 8 deletions

View file

@ -183,7 +183,7 @@ void NativeWindow::CloseContents(content::WebContents* source) {
// memory will not be freed until you call delete.
// In this way, it would be safe to manage windows via smart pointers. If you
// want to free memory when the window is closed, you can do deleting by
// overriding WillCloseWindow method in the observer.
// overriding the WillCloseWindow method in the observer.
CloseImmediately();
FOR_EACH_OBSERVER(NativeWindowObserver, observers_, OnWindowClosed());