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

Side by Side Diff: content/browser/accessibility/browser_accessibility_manager_mac.mm

Issue 349033010: Implement accessible states and notifications for the tab strip. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nvda_load_fix_3
Patch Set: Fix compile on other platforms Created 6 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
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 "content/browser/accessibility/browser_accessibility_manager_mac.h" 5 #include "content/browser/accessibility/browser_accessibility_manager_mac.h"
6 6
7 #import "base/logging.h" 7 #import "base/logging.h"
8 #import "content/browser/accessibility/browser_accessibility_cocoa.h" 8 #import "content/browser/accessibility/browser_accessibility_cocoa.h"
9 #import "content/browser/accessibility/browser_accessibility_mac.h" 9 #import "content/browser/accessibility/browser_accessibility_mac.h"
10 #include "content/common/accessibility_messages.h" 10 #include "content/common/accessibility_messages.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 break; 89 break;
90 case ui::AX_EVENT_LIVE_REGION_CHANGED: 90 case ui::AX_EVENT_LIVE_REGION_CHANGED:
91 event_id = @"AXLiveRegionChanged"; 91 event_id = @"AXLiveRegionChanged";
92 break; 92 break;
93 case ui::AX_EVENT_LOAD_COMPLETE: 93 case ui::AX_EVENT_LOAD_COMPLETE:
94 event_id = @"AXLoadComplete"; 94 event_id = @"AXLoadComplete";
95 break; 95 break;
96 case ui::AX_EVENT_MENU_LIST_VALUE_CHANGED: 96 case ui::AX_EVENT_MENU_LIST_VALUE_CHANGED:
97 // Not used on Mac. 97 // Not used on Mac.
98 return; 98 return;
99 case ui::AX_EVENT_SHOW:
100 // Not used on Mac.
101 return;
102 case ui::AX_EVENT_HIDE:
103 // Not used on Mac.
104 return;
105 case ui::AX_EVENT_ROW_COUNT_CHANGED: 99 case ui::AX_EVENT_ROW_COUNT_CHANGED:
106 event_id = NSAccessibilityRowCountChangedNotification; 100 event_id = NSAccessibilityRowCountChangedNotification;
107 break; 101 break;
108 case ui::AX_EVENT_ROW_COLLAPSED: 102 case ui::AX_EVENT_ROW_COLLAPSED:
109 event_id = @"AXRowCollapsed"; 103 event_id = @"AXRowCollapsed";
110 break; 104 break;
111 case ui::AX_EVENT_ROW_EXPANDED: 105 case ui::AX_EVENT_ROW_EXPANDED:
112 event_id = @"AXRowExpanded"; 106 event_id = @"AXRowExpanded";
113 break; 107 break;
114 case ui::AX_EVENT_SCROLLED_TO_ANCHOR: 108 case ui::AX_EVENT_SCROLLED_TO_ANCHOR:
115 // Not used on Mac. 109 // Not used on Mac.
116 return; 110 return;
117 case ui::AX_EVENT_SELECTED_CHILDREN_CHANGED: 111 case ui::AX_EVENT_SELECTED_CHILDREN_CHANGED:
118 event_id = NSAccessibilitySelectedChildrenChangedNotification; 112 event_id = NSAccessibilitySelectedChildrenChangedNotification;
119 break; 113 break;
120 case ui::AX_EVENT_SELECTED_TEXT_CHANGED: 114 case ui::AX_EVENT_TEXT_SELECTION_CHANGED:
121 event_id = NSAccessibilitySelectedTextChangedNotification; 115 event_id = NSAccessibilitySelectedTextChangedNotification;
122 break; 116 break;
123 case ui::AX_EVENT_TEXT_INSERTED:
124 // Not used on Mac.
125 return;
126 case ui::AX_EVENT_TEXT_REMOVED:
127 // Not used on Mac.
128 return;
129 case ui::AX_EVENT_VALUE_CHANGED: 117 case ui::AX_EVENT_VALUE_CHANGED:
130 event_id = NSAccessibilityValueChangedNotification; 118 event_id = NSAccessibilityValueChangedNotification;
131 break; 119 break;
132 case ui::AX_EVENT_ARIA_ATTRIBUTE_CHANGED: 120 case ui::AX_EVENT_ARIA_ATTRIBUTE_CHANGED:
133 // Not used on Mac. 121 // Not used on Mac.
134 return; 122 return;
135 case ui::AX_EVENT_AUTOCORRECTION_OCCURED: 123 case ui::AX_EVENT_AUTOCORRECTION_OCCURED:
136 // Not used on Mac. 124 // Not used on Mac.
137 return; 125 return;
138 case ui::AX_EVENT_INVALID_STATUS_CHANGED: 126 case ui::AX_EVENT_INVALID_STATUS_CHANGED:
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // internal state and find newly-added live regions this time. 161 // internal state and find newly-added live regions this time.
174 BrowserAccessibilityMac* root = 162 BrowserAccessibilityMac* root =
175 static_cast<BrowserAccessibilityMac*>(GetRoot()); 163 static_cast<BrowserAccessibilityMac*>(GetRoot());
176 root->RecreateNativeObject(); 164 root->RecreateNativeObject();
177 NotifyAccessibilityEvent(ui::AX_EVENT_CHILDREN_CHANGED, root); 165 NotifyAccessibilityEvent(ui::AX_EVENT_CHILDREN_CHANGED, root);
178 166
179 created_live_region_ = false; 167 created_live_region_ = false;
180 } 168 }
181 169
182 } // namespace content 170 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698