| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_H_ | 5 #ifndef CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ |
| 6 #define CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ | 6 #define CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ |
| 7 | 7 |
| 8 #include <atlbase.h> | 8 #include <atlbase.h> |
| 9 #include <atlcom.h> | 9 #include <atlcom.h> |
| 10 | 10 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 109 |
| 110 // Accessors/mutators. | 110 // Accessors/mutators. |
| 111 HWND parent_hwnd() const { return parent_hwnd_;} | 111 HWND parent_hwnd() const { return parent_hwnd_;} |
| 112 | 112 |
| 113 // Modify/retrieve the state (active/inactive) of this instance. | 113 // Modify/retrieve the state (active/inactive) of this instance. |
| 114 void set_instance_active(bool instance_active) { | 114 void set_instance_active(bool instance_active) { |
| 115 instance_active_ = instance_active; | 115 instance_active_ = instance_active; |
| 116 } | 116 } |
| 117 int instance_active() const { return instance_active_; } | 117 int instance_active() const { return instance_active_; } |
| 118 | 118 |
| 119 void set_direct_descendant(bool direct_descendant) { | |
| 120 direct_descendant_ = direct_descendant; | |
| 121 } | |
| 122 bool direct_descendant() const { return direct_descendant_; } | |
| 123 | |
| 124 int routing_id() const { return routing_id_; } | 119 int routing_id() const { return routing_id_; } |
| 125 | 120 |
| 126 private: | 121 private: |
| 127 // Creates an empty VARIANT. Used as the equivalent of a NULL (unused) input | 122 // Creates an empty VARIANT. Used as the equivalent of a NULL (unused) input |
| 128 // parameter. | 123 // parameter. |
| 129 VARIANT EmptyVariant() const { | 124 VARIANT EmptyVariant() const { |
| 130 VARIANT empty; | 125 VARIANT empty; |
| 131 empty.vt = VT_EMPTY; | 126 empty.vt = VT_EMPTY; |
| 132 return empty; | 127 return empty; |
| 133 } | 128 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 164 int iaccessible_id_; | 159 int iaccessible_id_; |
| 165 | 160 |
| 166 // The unique ids of this IAccessible instance. Used to help | 161 // The unique ids of this IAccessible instance. Used to help |
| 167 // BrowserAccessibilityManager instance retrieve the correct member | 162 // BrowserAccessibilityManager instance retrieve the correct member |
| 168 // variables for this process. | 163 // variables for this process. |
| 169 int routing_id_; | 164 int routing_id_; |
| 170 int process_id_; | 165 int process_id_; |
| 171 | 166 |
| 172 HWND parent_hwnd_; | 167 HWND parent_hwnd_; |
| 173 | 168 |
| 174 // Indicates if an incoming request for child information relates to a child | |
| 175 // id of a direct child of the BrowserAccessibility object, or if it refers | |
| 176 // to an object elsewhere in the MSAA tree. Set by BrowserAccessibilityManager | |
| 177 // and applicable only to the root BrowserAccessibility object (id 0). Needed | |
| 178 // to properly handled MSAA focus events, where the child id is the only | |
| 179 // parameter in our control. | |
| 180 bool direct_descendant_; | |
| 181 | |
| 182 // The instance should only be active if there is a non-terminated | 169 // The instance should only be active if there is a non-terminated |
| 183 // RenderProcessHost associated with it. The BrowserAccessibilityManager keeps | 170 // RenderProcessHost associated with it. The BrowserAccessibilityManager keeps |
| 184 // track of this state, and sets it to false to disable all calls into the | 171 // track of this state, and sets it to false to disable all calls into the |
| 185 // renderer from this instance of BroweserAccessibility, and have all | 172 // renderer from this instance of BroweserAccessibility, and have all |
| 186 // IAccessible functions return E_FAIL. | 173 // IAccessible functions return E_FAIL. |
| 187 bool instance_active_; | 174 bool instance_active_; |
| 188 | 175 |
| 189 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); | 176 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); |
| 190 }; | 177 }; |
| 191 #endif // CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ | 178 #endif // CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ |
| OLD | NEW |