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

Side by Side Diff: content/browser/tab_contents/navigation_entry.h

Issue 7453053: history: use display title, not page title (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: const Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_
6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 SSLStatus& ssl() { 317 SSLStatus& ssl() {
318 return ssl_; 318 return ssl_;
319 } 319 }
320 320
321 // Page-related helpers ------------------------------------------------------ 321 // Page-related helpers ------------------------------------------------------
322 322
323 // Returns the title to be displayed on the tab. This could be the title of 323 // Returns the title to be displayed on the tab. This could be the title of
324 // the page if it is available or the URL. |languages| is the list of 324 // the page if it is available or the URL. |languages| is the list of
325 // accpeted languages (e.g., prefs::kAcceptLanguages) or empty if proper 325 // accpeted languages (e.g., prefs::kAcceptLanguages) or empty if proper
326 // URL formatting isn't needed (e.g., unit tests). 326 // URL formatting isn't needed (e.g., unit tests).
327 const string16& GetTitleForDisplay(const std::string& languages); 327 const string16& GetTitleForDisplay(const std::string& languages) const;
328 328
329 // Returns true if the current tab is in view source mode. This will be false 329 // Returns true if the current tab is in view source mode. This will be false
330 // if there is no navigation. 330 // if there is no navigation.
331 bool IsViewSourceMode() const; 331 bool IsViewSourceMode() const;
332 332
333 // Tracking stuff ------------------------------------------------------------ 333 // Tracking stuff ------------------------------------------------------------
334 334
335 // The transition type indicates what the user did to move to this page from 335 // The transition type indicates what the user did to move to this page from
336 // the previous page. 336 // the previous page.
337 void set_transition_type(PageTransition::Type transition_type) { 337 void set_transition_type(PageTransition::Type transition_type) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 SSLStatus ssl_; 414 SSLStatus ssl_;
415 PageTransition::Type transition_type_; 415 PageTransition::Type transition_type_;
416 GURL user_typed_url_; 416 GURL user_typed_url_;
417 bool has_post_data_; 417 bool has_post_data_;
418 RestoreType restore_type_; 418 RestoreType restore_type_;
419 419
420 // This is a cached version of the result of GetTitleForDisplay. It prevents 420 // This is a cached version of the result of GetTitleForDisplay. It prevents
421 // us from having to do URL formatting on the URL evey time the title is 421 // us from having to do URL formatting on the URL evey time the title is
422 // displayed. When the URL, virtual URL, or title is set, this should be 422 // displayed. When the URL, virtual URL, or title is set, this should be
423 // cleared to force a refresh. 423 // cleared to force a refresh.
424 string16 cached_display_title_; 424 mutable string16 cached_display_title_;
425 425
426 // Copy and assignment is explicitly allowed for this class. 426 // Copy and assignment is explicitly allowed for this class.
427 }; 427 };
428 428
429 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ 429 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/history_tab_helper.cc ('k') | content/browser/tab_contents/navigation_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698