Merge revision 449-452 changes:

- Linux: Fix window destruction crash.
- Linux: Fix cefclient shutdown crash.
- Remove WebURLRequestTest.CANCEL test with WUR_STATE_LOADING due to flakiness.
- Linux: Initialize the 'proxy_type' variable to make the compiler happy.

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/963@454 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-01-03 18:07:21 +00:00
parent 912baa9f49
commit 58c8cfcd0a
7 changed files with 24 additions and 31 deletions

View File

@ -18,6 +18,14 @@
using WebKit::WebRect;
using WebKit::WebSize;
namespace {
void window_destroyed(GtkWidget* widget, CefBrowserImpl* browser) {
browser->UIT_DestroyBrowser();
}
} // namespace
void CefBrowserImpl::ParentWindowWillClose()
{
// TODO(port): Implement this method if necessary.
@ -84,6 +92,8 @@ bool CefBrowserImpl::UIT_CreateBrowser(const CefString& url)
dev_tools_agent_->SetWebView(webviewhost_->webview());
window_info_.m_Widget = webviewhost_->view_handle();
g_signal_connect(G_OBJECT(window_info_.m_Widget), "destroy",
G_CALLBACK(window_destroyed), this);
Unlock();
@ -176,11 +186,8 @@ int CefBrowserImpl::UIT_GetPagesCount(WebKit::WebFrame* frame)
// static
void CefBrowserImpl::UIT_CloseView(gfx::NativeView view)
{
GtkWidget* window =
gtk_widget_get_parent(gtk_widget_get_parent(GTK_WIDGET(view)));
MessageLoop::current()->PostTask(FROM_HERE, NewRunnableFunction(
&gtk_widget_destroy, GTK_WIDGET(window)));
GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(view));
gtk_widget_destroy(window);
}
// static