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

Unified Diff: chrome/browser/views/tabs/tab_renderer.cc

Issue 155334: Convert some stuff to string16 so the toolkit_views build can build again (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/views/tabs/tab_renderer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tabs/tab_renderer.cc
===================================================================
--- chrome/browser/views/tabs/tab_renderer.cc (revision 20304)
+++ chrome/browser/views/tabs/tab_renderer.cc (working copy)
@@ -276,7 +276,7 @@
void TabRenderer::UpdateData(TabContents* contents, bool loading_only) {
DCHECK(contents);
if (!loading_only) {
- data_.title = UTF16ToWideHack(contents->GetTitle());
+ data_.title = contents->GetTitle();
data_.off_the_record = contents->profile()->IsOffTheRecord();
data_.crashed = contents->is_crashed();
data_.favicon = contents->GetFavIcon();
@@ -377,7 +377,7 @@
// TabRenderer, protected:
std::wstring TabRenderer::GetTitle() const {
- return data_.title;
+ return UTF16ToWideHack(data_.title);
}
////////////////////////////////////////////////////////////////////////////////
@@ -432,12 +432,12 @@
}
// Paint the Title.
- std::wstring title = data_.title;
+ string16 title = data_.title;
if (title.empty()) {
if (data_.loading) {
- title = l10n_util::GetString(IDS_TAB_LOADING_TITLE);
+ title = l10n_util::GetStringUTF16(IDS_TAB_LOADING_TITLE);
} else {
- title = l10n_util::GetString(IDS_TAB_UNTITLED_TITLE);
+ title = l10n_util::GetStringUTF16(IDS_TAB_UNTITLED_TITLE);
}
} else {
Browser::FormatTitleForDisplay(&title);
@@ -448,9 +448,9 @@
BrowserThemeProvider::COLOR_TAB_TEXT :
BrowserThemeProvider::COLOR_BACKGROUND_TAB_TEXT);
- canvas->DrawStringInt(title, *title_font, title_color, title_bounds_.x(),
- title_bounds_.y(), title_bounds_.width(),
- title_bounds_.height());
+ canvas->DrawStringInt(UTF16ToWideHack(title), *title_font, title_color,
+ title_bounds_.x(), title_bounds_.y(),
+ title_bounds_.width(), title_bounds_.height());
}
void TabRenderer::Layout() {
« no previous file with comments | « chrome/browser/views/tabs/tab_renderer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698