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

Unified Diff: content/browser/accessibility/browser_accessibility.cc

Issue 1134653003: Implement UIElementsForSearchPredicate accessibility APIs for OS X. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback Created 5 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/accessibility/browser_accessibility.cc
diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc
index 0fdad54c91c4ef45eac37bfd034aba1e3c644049..e6aea32050a57a1a865b768e151035e9cb38cef2 100644
--- a/content/browser/accessibility/browser_accessibility.cc
+++ b/content/browser/accessibility/browser_accessibility.cc
@@ -759,6 +759,38 @@ bool BrowserAccessibility::IsWebAreaForPresentationalIframe() const {
return grandparent->GetRole() == ui::AX_ROLE_IFRAME_PRESENTATIONAL;
}
+bool BrowserAccessibility::IsControl() const {
+ switch (GetRole()) {
+ case ui::AX_ROLE_BUTTON:
+ case ui::AX_ROLE_BUTTON_DROP_DOWN:
+ case ui::AX_ROLE_CHECK_BOX:
+ case ui::AX_ROLE_COLOR_WELL:
+ case ui::AX_ROLE_COMBO_BOX:
+ case ui::AX_ROLE_DISCLOSURE_TRIANGLE:
+ case ui::AX_ROLE_LIST_BOX:
+ case ui::AX_ROLE_MENU_BAR:
+ case ui::AX_ROLE_MENU_BUTTON:
+ case ui::AX_ROLE_MENU_ITEM:
+ case ui::AX_ROLE_MENU_ITEM_CHECK_BOX:
+ case ui::AX_ROLE_MENU_ITEM_RADIO:
+ case ui::AX_ROLE_MENU:
+ case ui::AX_ROLE_POP_UP_BUTTON:
+ case ui::AX_ROLE_RADIO_BUTTON:
+ case ui::AX_ROLE_SCROLL_BAR:
+ case ui::AX_ROLE_SEARCH_BOX:
+ case ui::AX_ROLE_SLIDER:
+ case ui::AX_ROLE_SPIN_BUTTON:
+ case ui::AX_ROLE_SWITCH:
+ case ui::AX_ROLE_TAB:
+ case ui::AX_ROLE_TEXT_FIELD:
+ case ui::AX_ROLE_TOGGLE_BUTTON:
+ case ui::AX_ROLE_TREE:
+ return true;
+ default:
+ return false;
+ }
+}
+
int BrowserAccessibility::GetStaticTextLenRecursive() const {
if (GetRole() == ui::AX_ROLE_STATIC_TEXT ||
GetRole() == ui::AX_ROLE_LINE_BREAK) {
« no previous file with comments | « content/browser/accessibility/browser_accessibility.h ('k') | content/browser/accessibility/browser_accessibility_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698