| 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_RENDER_ACCESSIBILITY_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_ACCESSIBILITY_RENDER_ACCESSIBILITY_IMPL_H_ |
| 6 #define CONTENT_RENDERER_ACCESSIBILITY_RENDER_ACCESSIBILITY_IMPL_H_ | 6 #define CONTENT_RENDERER_ACCESSIBILITY_RENDER_ACCESSIBILITY_IMPL_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" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "content/common/ax_content_node_data.h" | 13 #include "content/common/ax_content_node_data.h" |
| 14 #include "content/public/renderer/render_accessibility.h" | 14 #include "content/public/renderer/render_accessibility.h" |
| 15 #include "content/public/renderer/render_frame_observer.h" | 15 #include "content/public/renderer/render_frame_observer.h" |
| 16 #include "content/renderer/accessibility/blink_ax_tree_source.h" | 16 #include "content/renderer/accessibility/blink_ax_tree_source.h" |
| 17 #include "third_party/WebKit/public/web/WebAXObject.h" | 17 #include "third_party/WebKit/public/web/WebAXObject.h" |
| 18 #include "ui/accessibility/ax_relative_bounds.h" |
| 18 #include "ui/accessibility/ax_tree.h" | 19 #include "ui/accessibility/ax_tree.h" |
| 19 #include "ui/accessibility/ax_tree_serializer.h" | 20 #include "ui/accessibility/ax_tree_serializer.h" |
| 20 #include "ui/gfx/geometry/rect_f.h" | 21 #include "ui/gfx/geometry/rect_f.h" |
| 21 | 22 |
| 22 struct AccessibilityHostMsg_EventParams; | 23 struct AccessibilityHostMsg_EventParams; |
| 23 | 24 |
| 24 namespace blink { | 25 namespace blink { |
| 25 class WebDocument; | 26 class WebDocument; |
| 26 class WebNode; | 27 class WebNode; |
| 27 }; | 28 }; |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 AXContentTreeData>; | 147 AXContentTreeData>; |
| 147 BlinkAXTreeSerializer serializer_; | 148 BlinkAXTreeSerializer serializer_; |
| 148 | 149 |
| 149 using PdfAXTreeSerializer = ui::AXTreeSerializer<const ui::AXNode*, | 150 using PdfAXTreeSerializer = ui::AXTreeSerializer<const ui::AXNode*, |
| 150 ui::AXNodeData, | 151 ui::AXNodeData, |
| 151 ui::AXTreeData>; | 152 ui::AXTreeData>; |
| 152 std::unique_ptr<PdfAXTreeSerializer> pdf_serializer_; | 153 std::unique_ptr<PdfAXTreeSerializer> pdf_serializer_; |
| 153 PdfAXTreeSource* pdf_tree_source_; | 154 PdfAXTreeSource* pdf_tree_source_; |
| 154 | 155 |
| 155 // Current location of every object, so we can detect when it moves. | 156 // Current location of every object, so we can detect when it moves. |
| 156 base::hash_map<int, gfx::RectF> locations_; | 157 base::hash_map<int, ui::AXRelativeBounds> locations_; |
| 157 | 158 |
| 158 // The most recently observed scroll offset of the root document element. | 159 // The most recently observed scroll offset of the root document element. |
| 159 // TODO(dmazzoni): remove once https://bugs.webkit.org/show_bug.cgi?id=73460 | 160 // TODO(dmazzoni): remove once https://bugs.webkit.org/show_bug.cgi?id=73460 |
| 160 // is fixed. | 161 // is fixed. |
| 161 gfx::Size last_scroll_offset_; | 162 gfx::Size last_scroll_offset_; |
| 162 | 163 |
| 163 // Set if we are waiting for an accessibility event ack. | 164 // Set if we are waiting for an accessibility event ack. |
| 164 bool ack_pending_; | 165 bool ack_pending_; |
| 165 | 166 |
| 166 // Nonzero if the browser requested we reset the accessibility state. | 167 // Nonzero if the browser requested we reset the accessibility state. |
| 167 // We need to return this token in the next IPC. | 168 // We need to return this token in the next IPC. |
| 168 int reset_token_; | 169 int reset_token_; |
| 169 | 170 |
| 170 // So we can queue up tasks to be executed later. | 171 // So we can queue up tasks to be executed later. |
| 171 base::WeakPtrFactory<RenderAccessibilityImpl> weak_factory_; | 172 base::WeakPtrFactory<RenderAccessibilityImpl> weak_factory_; |
| 172 | 173 |
| 173 DISALLOW_COPY_AND_ASSIGN(RenderAccessibilityImpl); | 174 DISALLOW_COPY_AND_ASSIGN(RenderAccessibilityImpl); |
| 174 }; | 175 }; |
| 175 | 176 |
| 176 } // namespace content | 177 } // namespace content |
| 177 | 178 |
| 178 #endif // CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_ | 179 #endif // CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_ |
| OLD | NEW |