| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_BROWSER_ACCESSIBILITY_MANAGER_WIN_H_ | 5 #ifndef CHROME_BROWSER_BROWSER_ACCESSIBILITY_MANAGER_WIN_H_ |
| 6 #define CHROME_BROWSER_BROWSER_ACCESSIBILITY_MANAGER_WIN_H_ | 6 #define CHROME_BROWSER_BROWSER_ACCESSIBILITY_MANAGER_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <atlbase.h> | 9 #include <atlbase.h> |
| 10 #include <atlcom.h> | 10 #include <atlcom.h> |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 // Tell the renderer to set focus to this node. | 73 // Tell the renderer to set focus to this node. |
| 74 void SetFocus(const BrowserAccessibility& node); | 74 void SetFocus(const BrowserAccessibility& node); |
| 75 | 75 |
| 76 // Tell the renderer to do the default action for this node. | 76 // Tell the renderer to do the default action for this node. |
| 77 void DoDefaultAction(const BrowserAccessibility& node); | 77 void DoDefaultAction(const BrowserAccessibility& node); |
| 78 | 78 |
| 79 // Called when the renderer process has notified us of a focus, state, | 79 // Called when the renderer process has notified us of a focus, state, |
| 80 // or children change. Send a notification to MSAA clients of the change. | 80 // or children change. Send a notification to MSAA clients of the change. |
| 81 void OnAccessibilityFocusChange(int acc_obj_id); | 81 void OnAccessibilityFocusChange(int acc_obj_id); |
| 82 void OnAccessibilityObjectStateChange(int acc_obj_id); | 82 void OnAccessibilityObjectStateChange( |
| 83 const webkit_glue::WebAccessibility& acc_obj); |
| 83 void OnAccessibilityObjectChildrenChange( | 84 void OnAccessibilityObjectChildrenChange( |
| 84 const std::vector<webkit_glue::WebAccessibility>& acc_changes); | 85 const std::vector<webkit_glue::WebAccessibility>& acc_changes); |
| 85 | 86 |
| 86 private: | 87 private: |
| 88 // Update the accessibility tree with an updated WebAccessibility tree or |
| 89 // subtree received from the renderer process. Returns the updated node or |
| 90 // NULL if no node was updated. |
| 91 BrowserAccessibility* UpdateTree( |
| 92 const webkit_glue::WebAccessibility& acc_obj); |
| 93 |
| 87 // Returns the next MSAA child id. | 94 // Returns the next MSAA child id. |
| 88 static LONG GetNextChildID(); | 95 static LONG GetNextChildID(); |
| 89 | 96 |
| 90 // Recursively build a tree of BrowserAccessibility objects from | 97 // Recursively build a tree of BrowserAccessibility objects from |
| 91 // the WebAccessibility tree received from the renderer process. | 98 // the WebAccessibility tree received from the renderer process. |
| 92 BrowserAccessibility* CreateAccessibilityTree( | 99 BrowserAccessibility* CreateAccessibilityTree( |
| 93 BrowserAccessibility* parent, | 100 BrowserAccessibility* parent, |
| 94 int child_id, | 101 int child_id, |
| 95 const webkit_glue::WebAccessibility& src, | 102 const webkit_glue::WebAccessibility& src, |
| 96 int index_in_parent); | 103 int index_in_parent); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 121 | 128 |
| 122 // The next child ID to use; static so that they're global to the process. | 129 // The next child ID to use; static so that they're global to the process. |
| 123 // Screen readers cache these IDs to see if they've seen the same object | 130 // Screen readers cache these IDs to see if they've seen the same object |
| 124 // before so we should avoid reusing them within the same project. | 131 // before so we should avoid reusing them within the same project. |
| 125 static LONG next_child_id_; | 132 static LONG next_child_id_; |
| 126 | 133 |
| 127 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); | 134 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); |
| 128 }; | 135 }; |
| 129 | 136 |
| 130 #endif // CHROME_BROWSER_BROWSER_ACCESSIBILITY_MANAGER_WIN_H_ | 137 #endif // CHROME_BROWSER_BROWSER_ACCESSIBILITY_MANAGER_WIN_H_ |
| OLD | NEW |