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

Unified Diff: chrome/browser/chromeos/input_method/candidate_window.cc

Issue 8142026: Revert 104076 - Change std::wstring to string16 for views::Link (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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/chromeos/frame/panel_controller.cc ('k') | chrome/browser/chromeos/login/background_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/input_method/candidate_window.cc
===================================================================
--- chrome/browser/chromeos/input_method/candidate_window.cc (revision 104083)
+++ chrome/browser/chromeos/input_method/candidate_window.cc (working copy)
@@ -244,7 +244,7 @@
// We'll create temporary shortcut labels, and choose the largest width.
for (int i = 0; i < lookup_table.page_size; ++i) {
shortcut_label->SetText(
- WideToUTF16Hack(CreateShortcutText(i, lookup_table.orientation)));
+ CreateShortcutText(i, lookup_table.orientation));
shortcut_column_width =
std::max(shortcut_column_width,
wrapped_shortcut_label->GetPreferredSize().width());
@@ -281,7 +281,7 @@
const size_t index = start_from + i;
candidate_label->SetText(
- UTF8ToUTF16(lookup_table.candidates[index]));
+ UTF8ToWide(lookup_table.candidates[index]));
candidate_column_width =
std::max(candidate_column_width,
candidate_label->GetPreferredSize().width());
@@ -308,7 +308,7 @@
const size_t index = start_from + i;
annotation_label->SetText(
- UTF8ToUTF16(lookup_table.annotations[index]));
+ UTF8ToWide(lookup_table.annotations[index]));
annotation_column_width =
std::max(annotation_column_width,
annotation_label->GetPreferredSize().width());
@@ -396,7 +396,7 @@
// Set the displayed text.
void SetText(const std::string& utf8_text) {
- label_->SetText(UTF8ToUTF16(utf8_text));
+ label_->SetText(UTF8ToWide(utf8_text));
}
protected:
@@ -655,6 +655,7 @@
// InfolistWindowView is the main container of the infolist window UI.
class InfolistWindowView : public views::View {
public:
+
InfolistWindowView(
views::Widget* parent_frame, views::Widget* candidate_window_frame);
virtual ~InfolistWindowView();
@@ -864,15 +865,15 @@
}
void CandidateView::SetCandidateText(const std::wstring& text) {
- candidate_label_->SetText(WideToUTF16Hack(text));
+ candidate_label_->SetText(text);
}
void CandidateView::SetShortcutText(const std::wstring& text) {
- shortcut_label_->SetText(WideToUTF16Hack(text));
+ shortcut_label_->SetText(text);
}
void CandidateView::SetAnnotationText(const std::wstring& text) {
- annotation_label_->SetText(WideToUTF16Hack(text));
+ annotation_label_->SetText(text);
}
void CandidateView::SetInfolistIcon(bool enable) {
@@ -1416,11 +1417,11 @@
void InfolistView::SetTitleText(const std::wstring& text) {
- title_label_->SetText(WideToUTF16Hack(text));
+ title_label_->SetText(text);
}
void InfolistView::SetDescriptionText(const std::wstring& text) {
- description_label_->SetText(WideToUTF16Hack(text));
+ description_label_->SetText(text);
}
void InfolistView::Select() {
@@ -1479,7 +1480,8 @@
caption_label->SetFont(caption_label->font().DeriveFont(kFontSizeDelta - 2));
caption_label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
caption_label->SetText(
- l10n_util::GetStringUTF16(IDS_INPUT_METHOD_INFOLIST_WINDOW_TITLE));
+ UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_INPUT_METHOD_INFOLIST_WINDOW_TITLE)));
views::View* wrapped_caption_label =
WrapWithPadding(caption_label, gfx::Insets(2, 2, 2, 2));
wrapped_caption_label->set_background(
« no previous file with comments | « chrome/browser/chromeos/frame/panel_controller.cc ('k') | chrome/browser/chromeos/login/background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698