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

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

Issue 1937873002: Adds AXExpandedChanged for general roles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comment Created 4 years, 7 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
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_manager_mac.mm » ('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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/accessibility_event_recorder.h" 5 #include "content/browser/accessibility/accessibility_event_recorder.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #import <Cocoa/Cocoa.h> 9 #import <Cocoa/Cocoa.h>
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 if (!application_.get()) 76 if (!application_.get())
77 LOG(FATAL) << "Failed to create AXUIElement for application."; 77 LOG(FATAL) << "Failed to create AXUIElement for application.";
78 78
79 // Add the notifications we care about to the observer. 79 // Add the notifications we care about to the observer.
80 AddNotification(NSAccessibilityFocusedUIElementChangedNotification); 80 AddNotification(NSAccessibilityFocusedUIElementChangedNotification);
81 AddNotification(NSAccessibilityRowCountChangedNotification); 81 AddNotification(NSAccessibilityRowCountChangedNotification);
82 AddNotification(NSAccessibilitySelectedChildrenChangedNotification); 82 AddNotification(NSAccessibilitySelectedChildrenChangedNotification);
83 AddNotification(NSAccessibilitySelectedRowsChangedNotification); 83 AddNotification(NSAccessibilitySelectedRowsChangedNotification);
84 AddNotification(NSAccessibilitySelectedTextChangedNotification); 84 AddNotification(NSAccessibilitySelectedTextChangedNotification);
85 AddNotification(NSAccessibilityValueChangedNotification); 85 AddNotification(NSAccessibilityValueChangedNotification);
86 AddNotification(@"AXExpandedChanged");
86 AddNotification(@"AXLayoutComplete"); 87 AddNotification(@"AXLayoutComplete");
87 AddNotification(@"AXLiveRegionChanged"); 88 AddNotification(@"AXLiveRegionChanged");
88 AddNotification(@"AXLoadComplete"); 89 AddNotification(@"AXLoadComplete");
89 AddNotification(@"AXRowCollapsed"); 90 AddNotification(@"AXRowCollapsed");
90 AddNotification(@"AXRowExpanded"); 91 AddNotification(@"AXRowExpanded");
91 92
92 // Add the observer to the current message loop. 93 // Add the observer to the current message loop.
93 observer_run_loop_source_ = AXObserverGetRunLoopSource(observer_ref_.get()); 94 observer_run_loop_source_ = AXObserverGetRunLoopSource(observer_ref_.get());
94 CFRunLoopAddSource(CFRunLoopGetCurrent(), observer_run_loop_source_, 95 CFRunLoopAddSource(CFRunLoopGetCurrent(), observer_run_loop_source_,
95 kCFRunLoopDefaultMode); 96 kCFRunLoopDefaultMode);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 144
144 std::string value = 145 std::string value =
145 GetAXAttributeValue(element, NSAccessibilityValueAttribute); 146 GetAXAttributeValue(element, NSAccessibilityValueAttribute);
146 if (!value.empty()) 147 if (!value.empty())
147 log += base::StringPrintf(" AXValue=\"%s\"", value.c_str()); 148 log += base::StringPrintf(" AXValue=\"%s\"", value.c_str());
148 149
149 event_logs_.push_back(log); 150 event_logs_.push_back(log);
150 } 151 }
151 152
152 } // namespace content 153 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_manager_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698