mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Add developer tools support (issue #127).
- Send title change notifications generated after page content is done loading. - Restore windows and bring to the front in BrowserWebViewDelegate::show(). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@168 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -112,7 +112,10 @@ void CefBrowserImpl::UIT_CreateBrowser(const CefString& url)
|
||||
// Set window user data to this object for future reference from the window
|
||||
// procedure
|
||||
app::win::SetWindowUserData(window_info_.m_hWnd, this);
|
||||
|
||||
|
||||
if (!settings_.developer_tools_disabled)
|
||||
dev_tools_agent_.reset(new BrowserDevToolsAgent());
|
||||
|
||||
// Add a reference that will be released in UIT_DestroyBrowser().
|
||||
AddRef();
|
||||
|
||||
@ -125,7 +128,10 @@ void CefBrowserImpl::UIT_CreateBrowser(const CefString& url)
|
||||
// Create the webview host object
|
||||
webviewhost_.reset(
|
||||
WebViewHost::Create(window_info_.m_hWnd, gfx::Rect(), delegate_.get(),
|
||||
NULL, prefs));
|
||||
dev_tools_agent_.get(), prefs));
|
||||
|
||||
if (!settings_.developer_tools_disabled)
|
||||
dev_tools_agent_->SetWebView(webviewhost_->webview());
|
||||
|
||||
if (!settings_.drag_drop_disabled)
|
||||
delegate_->RegisterDragDrop();
|
||||
@ -481,3 +487,15 @@ int CefBrowserImpl::UIT_GetPagesCount(WebKit::WebFrame* frame)
|
||||
|
||||
return page_count;
|
||||
}
|
||||
|
||||
void CefBrowserImpl::UIT_CloseDevTools()
|
||||
{
|
||||
REQUIRE_UIT();
|
||||
|
||||
if(!dev_tools_agent_.get())
|
||||
return;
|
||||
|
||||
BrowserDevToolsClient* client = dev_tools_agent_->client();
|
||||
if (client)
|
||||
PostMessage(client->browser()->GetMainWndHandle(), WM_CLOSE, 0, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user