OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ |
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ | 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 virtual gfx::Point AccessibilityOriginInScreen( | 68 virtual gfx::Point AccessibilityOriginInScreen( |
69 const gfx::Rect& bounds) const = 0; | 69 const gfx::Rect& bounds) const = 0; |
70 virtual void AccessibilityHitTest( | 70 virtual void AccessibilityHitTest( |
71 const gfx::Point& point) = 0; | 71 const gfx::Point& point) = 0; |
72 virtual void AccessibilitySetAccessibilityFocus(int acc_obj_id) = 0; | 72 virtual void AccessibilitySetAccessibilityFocus(int acc_obj_id) = 0; |
73 virtual void AccessibilityFatalError() = 0; | 73 virtual void AccessibilityFatalError() = 0; |
74 virtual gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() = 0; | 74 virtual gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() = 0; |
75 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() = 0; | 75 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() = 0; |
76 virtual BrowserAccessibilityManager* AccessibilityGetChildFrame( | 76 virtual BrowserAccessibilityManager* AccessibilityGetChildFrame( |
77 int accessibility_node_id) = 0; | 77 int accessibility_node_id) = 0; |
| 78 virtual void AccessibilityGetAllChildFrames( |
| 79 std::vector<BrowserAccessibilityManager*>* child_frames) = 0; |
78 virtual BrowserAccessibility* AccessibilityGetParentFrame() = 0; | 80 virtual BrowserAccessibility* AccessibilityGetParentFrame() = 0; |
79 }; | 81 }; |
80 | 82 |
81 class CONTENT_EXPORT BrowserAccessibilityFactory { | 83 class CONTENT_EXPORT BrowserAccessibilityFactory { |
82 public: | 84 public: |
83 virtual ~BrowserAccessibilityFactory() {} | 85 virtual ~BrowserAccessibilityFactory() {} |
84 | 86 |
85 // Create an instance of BrowserAccessibility and return a new | 87 // Create an instance of BrowserAccessibility and return a new |
86 // reference to it. | 88 // reference to it. |
87 virtual BrowserAccessibility* Create(); | 89 virtual BrowserAccessibility* Create(); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 void OnNodeChanged(ui::AXNode* node) override; | 239 void OnNodeChanged(ui::AXNode* node) override; |
238 void OnNodeCreationFinished(ui::AXNode* node) override; | 240 void OnNodeCreationFinished(ui::AXNode* node) override; |
239 void OnNodeChangeFinished(ui::AXNode* node) override; | 241 void OnNodeChangeFinished(ui::AXNode* node) override; |
240 void OnRootChanged(ui::AXNode* new_root) override {} | 242 void OnRootChanged(ui::AXNode* new_root) override {} |
241 | 243 |
242 BrowserAccessibilityDelegate* delegate() const { return delegate_; } | 244 BrowserAccessibilityDelegate* delegate() const { return delegate_; } |
243 void set_delegate(BrowserAccessibilityDelegate* delegate) { | 245 void set_delegate(BrowserAccessibilityDelegate* delegate) { |
244 delegate_ = delegate; | 246 delegate_ = delegate; |
245 } | 247 } |
246 | 248 |
| 249 // If this BrowserAccessibilityManager is a child frame or guest frame, |
| 250 // return the BrowserAccessibilityDelegate from the highest ancestor frame |
| 251 // in the frame tree. |
| 252 BrowserAccessibilityDelegate* GetDelegateFromRootManager(); |
| 253 |
247 // Get a snapshot of the current tree as an AXTreeUpdate. | 254 // Get a snapshot of the current tree as an AXTreeUpdate. |
248 ui::AXTreeUpdate SnapshotAXTreeForTesting(); | 255 ui::AXTreeUpdate SnapshotAXTreeForTesting(); |
249 | 256 |
250 protected: | 257 protected: |
251 BrowserAccessibilityManager( | 258 BrowserAccessibilityManager( |
252 BrowserAccessibilityDelegate* delegate, | 259 BrowserAccessibilityDelegate* delegate, |
253 BrowserAccessibilityFactory* factory); | 260 BrowserAccessibilityFactory* factory); |
254 | 261 |
255 BrowserAccessibilityManager( | 262 BrowserAccessibilityManager( |
256 const ui::AXTreeUpdate& initial_tree, | 263 const ui::AXTreeUpdate& initial_tree, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 OnScreenKeyboardState osk_state_; | 310 OnScreenKeyboardState osk_state_; |
304 | 311 |
305 BrowserAccessibilityFindInPageInfo find_in_page_info_; | 312 BrowserAccessibilityFindInPageInfo find_in_page_info_; |
306 | 313 |
307 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); | 314 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); |
308 }; | 315 }; |
309 | 316 |
310 } // namespace content | 317 } // namespace content |
311 | 318 |
312 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ | 319 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ |
OLD | NEW |