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

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

Issue 7717028: views: Remove NativeTextButton::SetLabel() and replace all call sites with SetText(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: also removes label() Created 9 years, 4 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
« no previous file with comments | « chrome/browser/chromeos/login/new_user_view.cc ('k') | views/controls/button/checkbox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 SchedulePaint(); 279 SchedulePaint();
280 280
281 // If the widget has detected that a screenreader is running, change the 281 // If the widget has detected that a screenreader is running, change the
282 // button names from "Choose" to the name of the search engine. This works 282 // button names from "Choose" to the name of the search engine. This works
283 // around a bug that JAWS ignores the accessible name of a native button. 283 // around a bug that JAWS ignores the accessible name of a native button.
284 if (GetWidget() && GetWidget()->IsAccessibleWidget()) { 284 if (GetWidget() && GetWidget()->IsAccessibleWidget()) {
285 std::vector<SearchEngineChoice*>::iterator it; 285 std::vector<SearchEngineChoice*>::iterator it;
286 for (it = search_engine_choices_.begin(); 286 for (it = search_engine_choices_.begin();
287 it != search_engine_choices_.end(); 287 it != search_engine_choices_.end();
288 it++) { 288 it++) {
289 (*it)->SetLabel((*it)->GetSearchEngine()->short_name()); 289 (*it)->SetText((*it)->GetSearchEngine()->short_name());
290 } 290 }
291 } 291 }
292 292
293 // This will tell screenreaders that they should read the full text 293 // This will tell screenreaders that they should read the full text
294 // of this dialog to the user now (rather than waiting for the user 294 // of this dialog to the user now (rather than waiting for the user
295 // to explore it). 295 // to explore it).
296 GetWidget()->NotifyAccessibilityEvent( 296 GetWidget()->NotifyAccessibilityEvent(
297 this, ui::AccessibilityTypes::EVENT_ALERT, true); 297 this, ui::AccessibilityTypes::EVENT_ALERT, true);
298 } 298 }
299 299
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 } 456 }
457 457
458 void FirstRunSearchEngineView::GetAccessibleState( 458 void FirstRunSearchEngineView::GetAccessibleState(
459 ui::AccessibleViewState* state) { 459 ui::AccessibleViewState* state) {
460 state->role = ui::AccessibilityTypes::ROLE_ALERT; 460 state->role = ui::AccessibilityTypes::ROLE_ALERT;
461 } 461 }
462 462
463 std::wstring FirstRunSearchEngineView::GetWindowTitle() const { 463 std::wstring FirstRunSearchEngineView::GetWindowTitle() const {
464 return UTF16ToWide(l10n_util::GetStringUTF16(IDS_FIRSTRUN_DLG_TITLE)); 464 return UTF16ToWide(l10n_util::GetStringUTF16(IDS_FIRSTRUN_DLG_TITLE));
465 } 465 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/new_user_view.cc ('k') | views/controls/button/checkbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698