Merge revision 655 changes:

- Windows: Delay destroying the browser window until pending drag operations have completed (issue #610).
- Revert: Windows: Reset the window procedure in the WebWidgetHost destructor to avoid crashes if messages are delivered after the window is destroyed.

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1025@656 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-05-30 18:06:58 +00:00
parent 46021aafbd
commit 99ebb866b6
6 changed files with 22 additions and 5 deletions

View File

@ -88,8 +88,15 @@ LRESULT CALLBACK CefBrowserImpl::WndProc(HWND hwnd, UINT message,
// Clear the user data pointer.
ui::SetWindowUserData(hwnd, NULL);
// Destroy the browser.
browser->UIT_DestroyBrowser();
BrowserWebViewDelegate* delegate = browser->UIT_GetWebViewDelegate();
if (delegate && delegate->drag_delegate()) {
// Don't destroy the browser while a drag operation is pending. Instead,
// destroy the browser once the drag operation completes.
delegate->set_destroy_on_drag_end(true);
} else {
// Destroy the browser.
browser->UIT_DestroyBrowser();
}
}
return 0;