Allow title change notifications after the document has loaded (issue #704).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@812 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2012-09-27 21:02:36 +00:00
parent 8957947cff
commit 61b0934996
2 changed files with 2 additions and 16 deletions

View File

@ -1077,13 +1077,8 @@ void CefBrowserHostImpl::WebContentsCreated(
void CefBrowserHostImpl::DidNavigateMainFramePostCommit(
content::WebContents* tab) {
{
base::AutoLock lock_scope(state_lock_);
has_document_ = false;
}
// Allow the new page to set the title again.
received_page_title_ = false;
base::AutoLock lock_scope(state_lock_);
has_document_ = false;
}
content::JavaScriptDialogCreator*
@ -1358,9 +1353,6 @@ void CefBrowserHostImpl::Observe(int type,
content::Details<std::pair<content::NavigationEntry*, bool> >(
details).ptr();
if (received_page_title_)
return;
if (title->first) {
if (client_.get()) {
CefRefPtr<CefDisplayHandler> handler = client_->GetDisplayHandler();
@ -1369,8 +1361,6 @@ void CefBrowserHostImpl::Observe(int type,
handler->OnTitleChange(this, title_str);
}
}
received_page_title_ = title->second;
}
} else if (type == content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE) {
focus_on_editable_field_ = *content::Details<bool>(details).ptr();
@ -1394,7 +1384,6 @@ CefBrowserHostImpl::CefBrowserHostImpl(const CefWindowInfo& window_info,
render_process_id_(0),
render_view_id_(0),
unique_id_(0),
received_page_title_(false),
is_loading_(false),
can_go_back_(false),
can_go_forward_(false),

View File

@ -377,9 +377,6 @@ class CefBrowserHostImpl : public CefBrowserHost,
// Unique id for the browser.
int unique_id_;
// True if the browser has received the page title for the current load.
bool received_page_title_;
// Used when creating a new popup window.
CefWindowInfo pending_window_info_;
CefBrowserSettings pending_settings_;