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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 virtual bool AccessibilityViewHasFocus() const = 0; | 64 virtual bool AccessibilityViewHasFocus() const = 0; |
65 virtual gfx::Rect AccessibilityGetViewBounds() const = 0; | 65 virtual gfx::Rect AccessibilityGetViewBounds() const = 0; |
66 virtual gfx::Point AccessibilityOriginInScreen( | 66 virtual gfx::Point AccessibilityOriginInScreen( |
67 const gfx::Rect& bounds) const = 0; | 67 const gfx::Rect& bounds) const = 0; |
68 virtual void AccessibilityHitTest( | 68 virtual void AccessibilityHitTest( |
69 const gfx::Point& point) = 0; | 69 const gfx::Point& point) = 0; |
70 virtual void AccessibilityFatalError() = 0; | 70 virtual void AccessibilityFatalError() = 0; |
71 virtual gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() = 0; | 71 virtual gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() = 0; |
72 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() = 0; | 72 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() = 0; |
73 virtual BrowserAccessibilityManager* AccessibilityGetChildFrame( | 73 virtual BrowserAccessibilityManager* AccessibilityGetChildFrame( |
74 int64 frame_tree_node_id) = 0; | 74 int accessibility_node_id) = 0; |
75 virtual BrowserAccessibilityManager* AccessibilityGetParentFrame() = 0; | 75 virtual BrowserAccessibility* AccessibilityGetParentFrame() = 0; |
76 }; | 76 }; |
77 | 77 |
78 class CONTENT_EXPORT BrowserAccessibilityFactory { | 78 class CONTENT_EXPORT BrowserAccessibilityFactory { |
79 public: | 79 public: |
80 virtual ~BrowserAccessibilityFactory() {} | 80 virtual ~BrowserAccessibilityFactory() {} |
81 | 81 |
82 // Create an instance of BrowserAccessibility and return a new | 82 // Create an instance of BrowserAccessibility and return a new |
83 // reference to it. | 83 // reference to it. |
84 virtual BrowserAccessibility* Create(); | 84 virtual BrowserAccessibility* Create(); |
85 }; | 85 }; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 virtual void OnRootChanged(ui::AXNode* new_root) OVERRIDE {} | 195 virtual void OnRootChanged(ui::AXNode* new_root) OVERRIDE {} |
196 | 196 |
197 BrowserAccessibilityDelegate* delegate() const { return delegate_; } | 197 BrowserAccessibilityDelegate* delegate() const { return delegate_; } |
198 void set_delegate(BrowserAccessibilityDelegate* delegate) { | 198 void set_delegate(BrowserAccessibilityDelegate* delegate) { |
199 delegate_ = delegate; | 199 delegate_ = delegate; |
200 } | 200 } |
201 | 201 |
202 // Get a snapshot of the current tree as an AXTreeUpdate. | 202 // Get a snapshot of the current tree as an AXTreeUpdate. |
203 ui::AXTreeUpdate SnapshotAXTreeForTesting(); | 203 ui::AXTreeUpdate SnapshotAXTreeForTesting(); |
204 | 204 |
205 // Frame tree support. | |
206 void SetChildFrameTreeNodeId(int32 node_id, int64 child_frame_tree_node_id); | |
207 BrowserAccessibility* GetCrossFrameParent(); | |
208 | |
209 protected: | 205 protected: |
210 BrowserAccessibilityManager( | 206 BrowserAccessibilityManager( |
211 BrowserAccessibilityDelegate* delegate, | 207 BrowserAccessibilityDelegate* delegate, |
212 BrowserAccessibilityFactory* factory); | 208 BrowserAccessibilityFactory* factory); |
213 | 209 |
214 BrowserAccessibilityManager( | 210 BrowserAccessibilityManager( |
215 const ui::AXTreeUpdate& initial_tree, | 211 const ui::AXTreeUpdate& initial_tree, |
216 BrowserAccessibilityDelegate* delegate, | 212 BrowserAccessibilityDelegate* delegate, |
217 BrowserAccessibilityFactory* factory); | 213 BrowserAccessibilityFactory* factory); |
218 | 214 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 256 |
261 // The on-screen keyboard state. | 257 // The on-screen keyboard state. |
262 OnScreenKeyboardState osk_state_; | 258 OnScreenKeyboardState osk_state_; |
263 | 259 |
264 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); | 260 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); |
265 }; | 261 }; |
266 | 262 |
267 } // namespace content | 263 } // namespace content |
268 | 264 |
269 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ | 265 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ |
OLD | NEW |