| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_PDF_RENDERER_PDF_ACCESSIBILITY_TREE_H_ | 5 #ifndef COMPONENTS_PDF_RENDERER_PDF_ACCESSIBILITY_TREE_H_ |
| 6 #define COMPONENTS_PDF_RENDERER_PDF_ACCESSIBILITY_TREE_H_ | 6 #define COMPONENTS_PDF_RENDERER_PDF_ACCESSIBILITY_TREE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "ppapi/c/pp_instance.h" | 11 #include "ppapi/c/pp_instance.h" |
| 12 #include "ppapi/c/private/ppb_pdf.h" | 12 #include "ppapi/c/private/ppb_pdf.h" |
| 13 #include "ui/accessibility/ax_node.h" | 13 #include "ui/accessibility/ax_node.h" |
| 14 #include "ui/accessibility/ax_tree.h" | 14 #include "ui/accessibility/ax_tree.h" |
| 15 #include "ui/accessibility/ax_tree_source.h" | 15 #include "ui/accessibility/ax_tree_source.h" |
| 16 #include "ui/gfx/geometry/rect_f.h" | 16 #include "ui/gfx/geometry/rect_f.h" |
| 17 #include "ui/gfx/geometry/vector2d_f.h" | 17 #include "ui/gfx/geometry/vector2d_f.h" |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 class RenderAccessibility; | |
| 21 class RenderView; | 20 class RenderView; |
| 22 } | 21 } |
| 23 | 22 |
| 24 namespace pdf { | 23 namespace pdf { |
| 25 | 24 |
| 26 class PdfAccessibilityTree | 25 class PdfAccessibilityTree |
| 27 : public ui::AXTreeSource<const ui::AXNode*, | 26 : public ui::AXTreeSource<const ui::AXNode*, |
| 28 ui::AXNodeData, | 27 ui::AXNodeData, |
| 29 ui::AXTreeData> { | 28 ui::AXTreeData> { |
| 30 public: | 29 public: |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 const PP_PrivateAccessibilityTextRunInfo& text_run, | 68 const PP_PrivateAccessibilityTextRunInfo& text_run, |
| 70 const std::vector<PP_PrivateAccessibilityCharInfo>& chars, | 69 const std::vector<PP_PrivateAccessibilityCharInfo>& chars, |
| 71 int char_index); | 70 int char_index); |
| 72 gfx::Vector2dF ToVector2dF(const PP_Point& p); | 71 gfx::Vector2dF ToVector2dF(const PP_Point& p); |
| 73 gfx::RectF ToRectF(const PP_Rect& r); | 72 gfx::RectF ToRectF(const PP_Rect& r); |
| 74 ui::AXNodeData* CreateNode(ui::AXRole role); | 73 ui::AXNodeData* CreateNode(ui::AXRole role); |
| 75 float GetDeviceScaleFactor() const; | 74 float GetDeviceScaleFactor() const; |
| 76 | 75 |
| 77 ui::AXTree tree_; | 76 ui::AXTree tree_; |
| 78 content::RenderView* render_view_; | 77 content::RenderView* render_view_; |
| 79 content::RenderAccessibility* render_accessibility_; | |
| 80 double zoom_; | 78 double zoom_; |
| 81 gfx::Vector2dF scroll_; | 79 gfx::Vector2dF scroll_; |
| 82 gfx::Vector2dF offset_; | 80 gfx::Vector2dF offset_; |
| 83 PP_PrivateAccessibilityDocInfo doc_info_; | 81 PP_PrivateAccessibilityDocInfo doc_info_; |
| 84 ui::AXNodeData* doc_node_; | 82 ui::AXNodeData* doc_node_; |
| 85 std::vector<std::unique_ptr<ui::AXNodeData>> nodes_; | 83 std::vector<std::unique_ptr<ui::AXNodeData>> nodes_; |
| 86 }; | 84 }; |
| 87 | 85 |
| 88 } // namespace pdf; | 86 } // namespace pdf; |
| 89 | 87 |
| 90 #endif // COMPONENTS_PDF_RENDERER_PDF_ACCESSIBILITY_TREE_H_ | 88 #endif // COMPONENTS_PDF_RENDERER_PDF_ACCESSIBILITY_TREE_H_ |
| OLD | NEW |