Make CefBrowserHost::CloseDevTools behave like CefBrowserHost::Close was called on the DevTools browser (issue #1439).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1916 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2014-11-19 17:56:37 +00:00
parent f963f10acb
commit af97f34ab0
2 changed files with 4 additions and 3 deletions

View File

@ -850,9 +850,7 @@ void CefBrowserHostImpl::CloseDevTools() {
if (CEF_CURRENTLY_ON_UIT()) {
if (!devtools_frontend_)
return;
devtools_observer_.reset();
devtools_frontend_->Close();
devtools_frontend_ = NULL;
} else {
CEF_POST_TASK(CEF_UIT,
base::Bind(&CefBrowserHostImpl::CloseDevTools, this));

View File

@ -7,6 +7,7 @@
#include "libcef/browser/content_browser_client.h"
#include "libcef/browser/devtools_delegate.h"
#include "libcef/browser/request_context_impl.h"
#include "libcef/browser/thread_util.h"
#include "base/command_line.h"
#include "base/json/json_reader.h"
@ -73,7 +74,8 @@ void CefDevToolsFrontend::Focus() {
}
void CefDevToolsFrontend::Close() {
frontend_browser_->CloseBrowser(true);
CEF_POST_TASK(CEF_UIT,
base::Bind(&CefBrowserHostImpl::CloseBrowser, frontend_browser_, true));
}
CefDevToolsFrontend::CefDevToolsFrontend(
@ -155,5 +157,6 @@ void CefDevToolsFrontend::DispatchProtocolMessage(
void CefDevToolsFrontend::AgentHostClosed(
content::DevToolsAgentHost* agent_host,
bool replaced) {
DCHECK(agent_host == agent_host_.get());
Close();
}