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

Side by Side Diff: chrome/browser/chromeos/login/wizard_accessibility_handler.cc

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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/chromeos/login/wizard_accessibility_handler.h" 5 #include "chrome/browser/chromeos/login/wizard_accessibility_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/i18n/char_iterator.h" 9 #include "base/i18n/char_iterator.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 void WizardAccessibilityHandler::DescribeAccessibilityEvent( 132 void WizardAccessibilityHandler::DescribeAccessibilityEvent(
133 NotificationType event_type, 133 NotificationType event_type,
134 const AccessibilityControlInfo* control_info, 134 const AccessibilityControlInfo* control_info,
135 std::string* out_spoken_description, 135 std::string* out_spoken_description,
136 EarconType* out_earcon) { 136 EarconType* out_earcon) {
137 *out_spoken_description = std::string(); 137 *out_spoken_description = std::string();
138 *out_earcon = NO_EARCON; 138 *out_earcon = NO_EARCON;
139 139
140 switch (event_type.value) { 140 switch (event_type.value) {
141 case NotificationType::ACCESSIBILITY_CONTROL_FOCUSED: 141 case chrome::ACCESSIBILITY_CONTROL_FOCUSED:
142 DescribeControl(control_info, false, out_spoken_description, out_earcon); 142 DescribeControl(control_info, false, out_spoken_description, out_earcon);
143 break; 143 break;
144 case NotificationType::ACCESSIBILITY_CONTROL_ACTION: 144 case chrome::ACCESSIBILITY_CONTROL_ACTION:
145 DescribeControl(control_info, true, out_spoken_description, out_earcon); 145 DescribeControl(control_info, true, out_spoken_description, out_earcon);
146 break; 146 break;
147 case NotificationType::ACCESSIBILITY_TEXT_CHANGED: 147 case chrome::ACCESSIBILITY_TEXT_CHANGED:
148 DescribeTextChanged(control_info, out_spoken_description, out_earcon); 148 DescribeTextChanged(control_info, out_spoken_description, out_earcon);
149 break; 149 break;
150 case NotificationType::ACCESSIBILITY_MENU_OPENED: 150 case chrome::ACCESSIBILITY_MENU_OPENED:
151 *out_earcon = EARCON_OBJECT_OPENED; 151 *out_earcon = EARCON_OBJECT_OPENED;
152 break; 152 break;
153 case NotificationType::ACCESSIBILITY_MENU_CLOSED: 153 case chrome::ACCESSIBILITY_MENU_CLOSED:
154 *out_earcon = EARCON_OBJECT_CLOSED; 154 *out_earcon = EARCON_OBJECT_CLOSED;
155 break; 155 break;
156 default: 156 default:
157 NOTREACHED(); 157 NOTREACHED();
158 return; 158 return;
159 } 159 }
160 160
161 if (control_info->type() == keys::kTypeTextBox) { 161 if (control_info->type() == keys::kTypeTextBox) {
162 const AccessibilityTextBoxInfo* text_box = 162 const AccessibilityTextBoxInfo* text_box =
163 static_cast<const AccessibilityTextBoxInfo*>(control_info); 163 static_cast<const AccessibilityTextBoxInfo*>(control_info);
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 } else if (!inserted.empty()) { 436 } else if (!inserted.empty()) {
437 // Speak inserted text. 437 // Speak inserted text.
438 AppendUtterance(inserted, out_spoken_description); 438 AppendUtterance(inserted, out_spoken_description);
439 } else if (!deleted.empty()) { 439 } else if (!deleted.empty()) {
440 // Speak deleted text. 440 // Speak deleted text.
441 AppendUtterance(deleted, out_spoken_description); 441 AppendUtterance(deleted, out_spoken_description);
442 } 442 }
443 } 443 }
444 444
445 } // namespace chromeos 445 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698