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_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_ | 5 #ifndef CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_ |
6 #define CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_ | 6 #define CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_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 28 matching lines...) Expand all Loading... |
39 // accessible objects that can be used to respond to accessibility requests | 39 // accessible objects that can be used to respond to accessibility requests |
40 // from other processes. | 40 // from other processes. |
41 // | 41 // |
42 // This class implements complete accessibility support for assistive | 42 // This class implements complete accessibility support for assistive |
43 // technology. It turns on Blink's accessibility code and sends a serialized | 43 // technology. It turns on Blink's accessibility code and sends a serialized |
44 // representation of that tree whenever it changes. It also handles requests | 44 // representation of that tree whenever it changes. It also handles requests |
45 // from the browser to perform accessibility actions on nodes in the tree | 45 // from the browser to perform accessibility actions on nodes in the tree |
46 // (e.g., change focus, or click on a button). | 46 // (e.g., change focus, or click on a button). |
47 class CONTENT_EXPORT RendererAccessibility : public RenderFrameObserver { | 47 class CONTENT_EXPORT RendererAccessibility : public RenderFrameObserver { |
48 public: | 48 public: |
| 49 // Request a one-time snapshot of the accessibility tree without |
| 50 // enabling accessibility if it wasn't already enabled. |
| 51 static void SnapshotAccessibilityTree(RenderFrameImpl* render_frame, |
| 52 ui::AXTreeUpdate* response); |
| 53 |
49 explicit RendererAccessibility(RenderFrameImpl* render_frame); | 54 explicit RendererAccessibility(RenderFrameImpl* render_frame); |
50 ~RendererAccessibility() override; | 55 ~RendererAccessibility() override; |
51 | 56 |
52 // RenderFrameObserver implementation. | 57 // RenderFrameObserver implementation. |
53 bool OnMessageReceived(const IPC::Message& message) override; | 58 bool OnMessageReceived(const IPC::Message& message) override; |
54 | 59 |
55 // Called when an accessibility notification occurs in Blink. | 60 // Called when an accessibility notification occurs in Blink. |
56 void HandleWebAccessibilityEvent(const blink::WebAXObject& obj, | 61 void HandleWebAccessibilityEvent(const blink::WebAXObject& obj, |
57 blink::WebAXEvent event); | 62 blink::WebAXEvent event); |
58 | 63 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 136 |
132 // So we can queue up tasks to be executed later. | 137 // So we can queue up tasks to be executed later. |
133 base::WeakPtrFactory<RendererAccessibility> weak_factory_; | 138 base::WeakPtrFactory<RendererAccessibility> weak_factory_; |
134 | 139 |
135 DISALLOW_COPY_AND_ASSIGN(RendererAccessibility); | 140 DISALLOW_COPY_AND_ASSIGN(RendererAccessibility); |
136 }; | 141 }; |
137 | 142 |
138 } // namespace content | 143 } // namespace content |
139 | 144 |
140 #endif // CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_ | 145 #endif // CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_ |
OLD | NEW |