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

Side by Side Diff: content/browser/accessibility/browser_accessibility_win.cc

Issue 7966013: Rewrite renderer accessibility to not use WebAccessibilityCache. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 "content/browser/accessibility/browser_accessibility_win.h" 5 #include "content/browser/accessibility/browser_accessibility_win.h"
6 6
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "content/browser/accessibility/browser_accessibility_manager_win.h" 10 #include "content/browser/accessibility/browser_accessibility_manager_win.h"
(...skipping 2519 matching lines...) Expand 10 before | Expand all | Expand 10 after
2530 break; 2530 break;
2531 case WebAccessibility::ROLE_DIALOG: 2531 case WebAccessibility::ROLE_DIALOG:
2532 ia_role_ = ROLE_SYSTEM_DIALOG; 2532 ia_role_ = ROLE_SYSTEM_DIALOG;
2533 ia_state_|= STATE_SYSTEM_READONLY; 2533 ia_state_|= STATE_SYSTEM_READONLY;
2534 break; 2534 break;
2535 case WebAccessibility::ROLE_DISCLOSURE_TRIANGLE: 2535 case WebAccessibility::ROLE_DISCLOSURE_TRIANGLE:
2536 ia_role_ = ROLE_SYSTEM_OUTLINEBUTTON; 2536 ia_role_ = ROLE_SYSTEM_OUTLINEBUTTON;
2537 ia_state_|= STATE_SYSTEM_READONLY; 2537 ia_state_|= STATE_SYSTEM_READONLY;
2538 break; 2538 break;
2539 case WebAccessibility::ROLE_DOCUMENT: 2539 case WebAccessibility::ROLE_DOCUMENT:
2540 case WebAccessibility::ROLE_ROOT_WEB_AREA:
2540 case WebAccessibility::ROLE_WEB_AREA: 2541 case WebAccessibility::ROLE_WEB_AREA:
2541 ia_role_ = ROLE_SYSTEM_DOCUMENT; 2542 ia_role_ = ROLE_SYSTEM_DOCUMENT;
2542 ia_state_|= STATE_SYSTEM_READONLY; 2543 ia_state_|= STATE_SYSTEM_READONLY;
2543 ia_state_|= STATE_SYSTEM_FOCUSABLE; 2544 ia_state_|= STATE_SYSTEM_FOCUSABLE;
2544 break; 2545 break;
2545 case WebAccessibility::ROLE_EDITABLE_TEXT: 2546 case WebAccessibility::ROLE_EDITABLE_TEXT:
2546 ia_role_ = ROLE_SYSTEM_TEXT; 2547 ia_role_ = ROLE_SYSTEM_TEXT;
2547 ia2_state_ |= IA2_STATE_SINGLE_LINE; 2548 ia2_state_ |= IA2_STATE_SINGLE_LINE;
2548 ia2_state_ |= IA2_STATE_EDITABLE; 2549 ia2_state_ |= IA2_STATE_EDITABLE;
2549 break; 2550 break;
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
2795 } 2796 }
2796 2797
2797 // The role should always be set. 2798 // The role should always be set.
2798 DCHECK(!role_name_.empty() || ia_role_); 2799 DCHECK(!role_name_.empty() || ia_role_);
2799 2800
2800 // If we didn't explicitly set the IAccessible2 role, make it the same 2801 // If we didn't explicitly set the IAccessible2 role, make it the same
2801 // as the MSAA role. 2802 // as the MSAA role.
2802 if (!ia2_role_) 2803 if (!ia2_role_)
2803 ia2_role_ = ia_role_; 2804 ia2_role_ = ia_role_;
2804 } 2805 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698