| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |