Emit event when title becomes empty

This commit is contained in:
Cheng Zhao 2015-12-01 17:52:13 +08:00
parent 8d20dda6d7
commit 83ee78451a

View file

@ -519,9 +519,10 @@ void WebContents::DidNavigateMainFrame(
void WebContents::TitleWasSet(content::NavigationEntry* entry, void WebContents::TitleWasSet(content::NavigationEntry* entry,
bool explicit_set) { bool explicit_set) {
// Back/Forward navigation may have pruned entries.
if (entry) if (entry)
Emit("page-title-set", entry->GetTitle(), explicit_set); Emit("page-title-set", entry->GetTitle(), explicit_set);
else
Emit("page-title-set", "", explicit_set);
} }
void WebContents::DidUpdateFaviconURL( void WebContents::DidUpdateFaviconURL(