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

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

Issue 6192007: Remove wstring from views. Part 3: Switch accessibility strings to string16.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 logo_label->SetTooltipText(search_engine_->short_name()); 85 logo_label->SetTooltipText(search_engine_->short_name());
86 logo_label->SetMultiLine(true); 86 logo_label->SetMultiLine(true);
87 logo_label->SizeToFit(kSmallLogoWidth); 87 logo_label->SizeToFit(kSmallLogoWidth);
88 choice_view_ = logo_label; 88 choice_view_ = logo_label;
89 } 89 }
90 90
91 // The accessible name of the button provides accessibility for 91 // The accessible name of the button provides accessibility for
92 // screenreaders. It uses the browser name rather than the text of the 92 // screenreaders. It uses the browser name rather than the text of the
93 // button "Choose", since it's not obvious to a screenreader user which 93 // button "Choose", since it's not obvious to a screenreader user which
94 // browser each button corresponds to. 94 // browser each button corresponds to.
95 SetAccessibleName(search_engine_->short_name()); 95 SetAccessibleName(WideToUTF16Hack(search_engine_->short_name()));
96 } 96 }
97 97
98 int SearchEngineChoice::GetChoiceViewWidth() { 98 int SearchEngineChoice::GetChoiceViewWidth() {
99 if (is_image_label_) 99 if (is_image_label_)
100 return choice_view_->GetPreferredSize().width(); 100 return choice_view_->GetPreferredSize().width();
101 else 101 else
102 return kSmallLogoWidth; 102 return kSmallLogoWidth;
103 } 103 }
104 104
105 int SearchEngineChoice::GetChoiceViewHeight() { 105 int SearchEngineChoice::GetChoiceViewHeight() {
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 } // if (search_engine_choices.size() > 0) 425 } // if (search_engine_choices.size() > 0)
426 } 426 }
427 427
428 AccessibilityTypes::Role FirstRunSearchEngineView::GetAccessibleRole() { 428 AccessibilityTypes::Role FirstRunSearchEngineView::GetAccessibleRole() {
429 return AccessibilityTypes::ROLE_ALERT; 429 return AccessibilityTypes::ROLE_ALERT;
430 } 430 }
431 431
432 std::wstring FirstRunSearchEngineView::GetWindowTitle() const { 432 std::wstring FirstRunSearchEngineView::GetWindowTitle() const {
433 return UTF16ToWide(l10n_util::GetStringUTF16(IDS_FIRSTRUN_DLG_TITLE)); 433 return UTF16ToWide(l10n_util::GetStringUTF16(IDS_FIRSTRUN_DLG_TITLE));
434 } 434 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/find_bar_view.cc ('k') | chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698