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

Side by Side 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: Using WebContents::UpdateTitleForEntry() instead of NavigationEntry::SetTitle() 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_
6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // 80 //
81 // GetVirtualURL() will return the URL to display to the user in all cases, so 81 // GetVirtualURL() will return the URL to display to the user in all cases, so
82 // if there is no overridden display URL, it will return the actual one. 82 // if there is no overridden display URL, it will return the actual one.
83 virtual void SetVirtualURL(const GURL& url) = 0; 83 virtual void SetVirtualURL(const GURL& url) = 0;
84 virtual const GURL& GetVirtualURL() const = 0; 84 virtual const GURL& GetVirtualURL() const = 0;
85 85
86 // The title as set by the page. This will be empty if there is no title set. 86 // The title as set by the page. This will be empty if there is no title set.
87 // The caller is responsible for detecting when there is no title and 87 // The caller is responsible for detecting when there is no title and
88 // displaying the appropriate "Untitled" label if this is being displayed to 88 // displaying the appropriate "Untitled" label if this is being displayed to
89 // the user. 89 // the user.
90 // Use WebContents::UpdateTitleForEntry() in most cases, since that notifies
91 // observers when the visible title changes. Only call the below
Lei Zhang 2016/07/13 23:17:17 phrasing: Only call NavigationEntry::SetTitle() be
afakhry 2016/07/13 23:36:17 Done.
92 // NavigationEntry::SetTitle() directly when this entry is known not to be
93 // visible.
90 virtual void SetTitle(const base::string16& title) = 0; 94 virtual void SetTitle(const base::string16& title) = 0;
91 virtual const base::string16& GetTitle() const = 0; 95 virtual const base::string16& GetTitle() const = 0;
92 96
93 // Page state is an opaque blob created by Blink that represents the state of 97 // Page state is an opaque blob created by Blink that represents the state of
94 // the page. This includes form entries and scroll position for each frame. 98 // the page. This includes form entries and scroll position for each frame.
95 // We store it so that we can supply it back to Blink to restore form state 99 // We store it so that we can supply it back to Blink to restore form state
96 // properly when the user goes back and forward. 100 // properly when the user goes back and forward.
97 // 101 //
98 // NOTE: This state is saved to disk and used to restore previous states. If 102 // NOTE: This state is saved to disk and used to restore previous states. If
99 // the format is modified in the future, we should still be able to deal with 103 // the format is modified in the future, we should still be able to deal with
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 virtual void SetRedirectChain(const std::vector<GURL>& redirects) = 0; 223 virtual void SetRedirectChain(const std::vector<GURL>& redirects) = 0;
220 virtual const std::vector<GURL>& GetRedirectChain() const = 0; 224 virtual const std::vector<GURL>& GetRedirectChain() const = 0;
221 225
222 // True if this entry is restored and hasn't been loaded. 226 // True if this entry is restored and hasn't been loaded.
223 virtual bool IsRestored() const = 0; 227 virtual bool IsRestored() const = 0;
224 }; 228 };
225 229
226 } // namespace content 230 } // namespace content
227 231
228 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ 232 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698