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

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

Issue 6878089: Add and use a base::i18n::StringWithDirection for carrying titles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: license Created 9 years, 8 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
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/i18n/rtl.h"
13 #include "chrome/common/security_style.h" 14 #include "chrome/common/security_style.h"
14 #include "content/common/page_transition_types.h" 15 #include "content/common/page_transition_types.h"
15 #include "content/common/page_type.h" 16 #include "content/common/page_type.h"
16 #include "googleurl/src/gurl.h" 17 #include "googleurl/src/gurl.h"
17 #include "third_party/skia/include/core/SkBitmap.h" 18 #include "third_party/skia/include/core/SkBitmap.h"
18 19
19 class SiteInstance; 20 class SiteInstance;
20 21
21 //////////////////////////////////////////////////////////////////////////////// 22 ////////////////////////////////////////////////////////////////////////////////
22 // 23 //
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 return update_virtual_url_with_url_; 263 return update_virtual_url_with_url_;
263 } 264 }
264 void set_update_virtual_url_with_url(bool update) { 265 void set_update_virtual_url_with_url(bool update) {
265 update_virtual_url_with_url_ = update; 266 update_virtual_url_with_url_ = update;
266 } 267 }
267 268
268 // The title as set by the page. This will be empty if there is no title set. 269 // The title as set by the page. This will be empty if there is no title set.
269 // The caller is responsible for detecting when there is no title and 270 // The caller is responsible for detecting when there is no title and
270 // displaying the appropriate "Untitled" label if this is being displayed to 271 // displaying the appropriate "Untitled" label if this is being displayed to
271 // the user. 272 // the user.
273 void set_title(const base::i18n::String16WithDirection& title) {
274 set_title(title.string());
275 }
276 // TODO(evan): remove the string16-setter once callers are updated.
277 // http://code.google.com/p/chromium/issues/detail?id=27094
272 void set_title(const string16& title) { 278 void set_title(const string16& title) {
273 title_ = title; 279 title_ = title;
274 cached_display_title_.clear(); 280 cached_display_title_.clear();
275 } 281 }
276 const string16& title() const { 282 const string16& title() const {
277 return title_; 283 return title_;
278 } 284 }
279 285
280 // The favicon data and tracking information. See FaviconStatus above. 286 // The favicon data and tracking information. See FaviconStatus above.
281 const FaviconStatus& favicon() const { 287 const FaviconStatus& favicon() const {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 // This is a cached version of the result of GetTitleForDisplay. It prevents 426 // 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 427 // 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 428 // displayed. When the URL, virtual URL, or title is set, this should be
423 // cleared to force a refresh. 429 // cleared to force a refresh.
424 string16 cached_display_title_; 430 string16 cached_display_title_;
425 431
426 // Copy and assignment is explicitly allowed for this class. 432 // Copy and assignment is explicitly allowed for this class.
427 }; 433 };
428 434
429 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ 435 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698