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

Side by Side Diff: chrome/browser/ui/views/first_run_search_engine_view.cc

Issue 8113031: Change std::wstring to string16 for views::Label and views::Link (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 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 #include "chrome/browser/ui/views/first_run_search_engine_view.h" 5 #include "chrome/browser/ui/views/first_run_search_engine_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 background_image_->SetHorizontalAlignment(ImageView::LEADING); 318 background_image_->SetHorizontalAlignment(ImageView::LEADING);
319 } else { 319 } else {
320 background_image_->SetHorizontalAlignment(ImageView::TRAILING); 320 background_image_->SetHorizontalAlignment(ImageView::TRAILING);
321 } 321 }
322 322
323 AddChildView(background_image_); 323 AddChildView(background_image_);
324 324
325 int label_width = GetPreferredSize().width() - 2 * views::kPanelHorizMargin; 325 int label_width = GetPreferredSize().width() - 2 * views::kPanelHorizMargin;
326 326
327 // Add title and text asking the user to choose a search engine: 327 // Add title and text asking the user to choose a search engine:
328 title_label_ = new Label(UTF16ToWide(l10n_util::GetStringUTF16( 328 title_label_ = new Label(l10n_util::GetStringUTF16(
329 IDS_FR_SEARCH_MAIN_LABEL))); 329 IDS_FR_SEARCH_MAIN_LABEL));
330 title_label_->SetColor(SK_ColorBLACK); 330 title_label_->SetColor(SK_ColorBLACK);
331 title_label_->SetFont(title_label_->font().DeriveFont(3, gfx::Font::BOLD)); 331 title_label_->SetFont(title_label_->font().DeriveFont(3, gfx::Font::BOLD));
332 title_label_->SetMultiLine(true); 332 title_label_->SetMultiLine(true);
333 title_label_->SetHorizontalAlignment(Label::ALIGN_LEFT); 333 title_label_->SetHorizontalAlignment(Label::ALIGN_LEFT);
334 title_label_->SizeToFit(label_width); 334 title_label_->SizeToFit(label_width);
335 AddChildView(title_label_); 335 AddChildView(title_label_);
336 336
337 text_label_ = new Label(UTF16ToWide(l10n_util::GetStringFUTF16( 337 text_label_ = new Label(l10n_util::GetStringFUTF16(
338 IDS_FR_SEARCH_TEXT, 338 IDS_FR_SEARCH_TEXT,
339 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)))); 339 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
340 text_label_->SetColor(SK_ColorBLACK); 340 text_label_->SetColor(SK_ColorBLACK);
341 text_label_->SetFont(text_label_->font().DeriveFont(1, gfx::Font::NORMAL)); 341 text_label_->SetFont(text_label_->font().DeriveFont(1, gfx::Font::NORMAL));
342 text_label_->SetMultiLine(true); 342 text_label_->SetMultiLine(true);
343 text_label_->SetHorizontalAlignment(Label::ALIGN_LEFT); 343 text_label_->SetHorizontalAlignment(Label::ALIGN_LEFT);
344 text_label_->SizeToFit(label_width); 344 text_label_->SizeToFit(label_width);
345 AddChildView(text_label_); 345 AddChildView(text_label_);
346 } 346 }
347 347
348 void FirstRunSearchEngineView::Layout() { 348 void FirstRunSearchEngineView::Layout() {
349 // Disable the close button. 349 // Disable the close button.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 search_engine_choices_[3]->SetBounds(next_h_space, next_v_space, 454 search_engine_choices_[3]->SetBounds(next_h_space, next_v_space,
455 button_width, button_height); 455 button_width, button_height);
456 } 456 }
457 } // if (search_engine_choices.size() > 0) 457 } // if (search_engine_choices.size() > 0)
458 } 458 }
459 459
460 void FirstRunSearchEngineView::GetAccessibleState( 460 void FirstRunSearchEngineView::GetAccessibleState(
461 ui::AccessibleViewState* state) { 461 ui::AccessibleViewState* state) {
462 state->role = ui::AccessibilityTypes::ROLE_ALERT; 462 state->role = ui::AccessibilityTypes::ROLE_ALERT;
463 } 463 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/first_run_bubble.cc ('k') | chrome/browser/ui/views/fullscreen_exit_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698