Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1072)

Unified Diff: content/public/browser/navigation_entry.h

Issue 2086423005: Using WebContents::UpdateTitleForEntry() instead of NavigationEntry::SetTitle() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improving comment and removing the NOTREACHED. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/browser/navigation_entry.h
diff --git a/content/public/browser/navigation_entry.h b/content/public/browser/navigation_entry.h
index 92f020f9448166c6eb75d7c68032b4f3acd39280..87c17cd29e18c2dd566e6435cc46dbb6716c75d5 100644
--- a/content/public/browser/navigation_entry.h
+++ b/content/public/browser/navigation_entry.h
@@ -87,6 +87,10 @@ class NavigationEntry {
// The caller is responsible for detecting when there is no title and
// displaying the appropriate "Untitled" label if this is being displayed to
// the user.
+ // Use WebContents::UpdateTitleForEntry() in most cases, since that notifies
+ // observers when the visible title changes. Only call
+ // NavigationEntry::SetTitle() below directly when this entry is known not to
+ // be visible.
virtual void SetTitle(const base::string16& title) = 0;
virtual const base::string16& GetTitle() const = 0;

Powered by Google App Engine
This is Rietveld 408576698