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/accessibility_event_router_views.cc

Issue 9815027: Give the system tray an accessible role and name so that something (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | « ash/system/tray/system_tray.cc ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/accessibility_event_router_views.h" 5 #include "chrome/browser/ui/views/accessibility_event_router_views.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 if (type == chrome::NOTIFICATION_ACCESSIBILITY_MENU_OPENED || 128 if (type == chrome::NOTIFICATION_ACCESSIBILITY_MENU_OPENED ||
129 type == chrome::NOTIFICATION_ACCESSIBILITY_MENU_CLOSED) { 129 type == chrome::NOTIFICATION_ACCESSIBILITY_MENU_CLOSED) {
130 SendMenuNotification(view, type, profile); 130 SendMenuNotification(view, type, profile);
131 return; 131 return;
132 } 132 }
133 133
134 ui::AccessibleViewState state; 134 ui::AccessibleViewState state;
135 view->GetAccessibleState(&state); 135 view->GetAccessibleState(&state);
136 switch (state.role) { 136 switch (state.role) {
137 case ui::AccessibilityTypes::ROLE_ALERT: 137 case ui::AccessibilityTypes::ROLE_ALERT:
138 case ui::AccessibilityTypes::ROLE_WINDOW:
138 SendWindowNotification(view, type, profile); 139 SendWindowNotification(view, type, profile);
139 break; 140 break;
140 case ui::AccessibilityTypes::ROLE_BUTTONMENU: 141 case ui::AccessibilityTypes::ROLE_BUTTONMENU:
141 case ui::AccessibilityTypes::ROLE_MENUBAR: 142 case ui::AccessibilityTypes::ROLE_MENUBAR:
142 case ui::AccessibilityTypes::ROLE_MENUPOPUP: 143 case ui::AccessibilityTypes::ROLE_MENUPOPUP:
143 SendMenuNotification(view, type, profile); 144 SendMenuNotification(view, type, profile);
144 break; 145 break;
145 case ui::AccessibilityTypes::ROLE_BUTTONDROPDOWN: 146 case ui::AccessibilityTypes::ROLE_BUTTONDROPDOWN:
146 case ui::AccessibilityTypes::ROLE_PUSHBUTTON: 147 case ui::AccessibilityTypes::ROLE_PUSHBUTTON:
147 SendButtonNotification(view, type, profile); 148 SendButtonNotification(view, type, profile);
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 return UTF16ToUTF8(state.name); 439 return UTF16ToUTF8(state.name);
439 440
440 for (int i = 0; i < view->child_count(); ++i) { 441 for (int i = 0; i < view->child_count(); ++i) {
441 views::View* child = view->child_at(i); 442 views::View* child = view->child_at(i);
442 std::string result = RecursiveGetStaticText(child); 443 std::string result = RecursiveGetStaticText(child);
443 if (!result.empty()) 444 if (!result.empty())
444 return result; 445 return result;
445 } 446 }
446 return std::string(); 447 return std::string();
447 } 448 }
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698