OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "content/renderer/accessibility/blink_ax_tree_source.h" | 5 #include "content/renderer/accessibility/blink_ax_tree_source.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 switch (role) { | 68 switch (role) { |
69 case ui::AX_ROLE_ARTICLE: | 69 case ui::AX_ROLE_ARTICLE: |
70 return "article"; | 70 return "article"; |
71 case ui::AX_ROLE_BANNER: | 71 case ui::AX_ROLE_BANNER: |
72 return "banner"; | 72 return "banner"; |
73 case ui::AX_ROLE_COMPLEMENTARY: | 73 case ui::AX_ROLE_COMPLEMENTARY: |
74 return "complementary"; | 74 return "complementary"; |
75 case ui::AX_ROLE_CONTENT_INFO: | 75 case ui::AX_ROLE_CONTENT_INFO: |
76 case ui::AX_ROLE_FOOTER: | 76 case ui::AX_ROLE_FOOTER: |
77 return "contentinfo"; | 77 return "contentinfo"; |
| 78 case ui::AX_ROLE_IMAGE: |
| 79 return "img"; |
78 case ui::AX_ROLE_MAIN: | 80 case ui::AX_ROLE_MAIN: |
79 return "main"; | 81 return "main"; |
80 case ui::AX_ROLE_NAVIGATION: | 82 case ui::AX_ROLE_NAVIGATION: |
81 return "navigation"; | 83 return "navigation"; |
82 case ui::AX_ROLE_REGION: | 84 case ui::AX_ROLE_REGION: |
83 return "region"; | 85 return "region"; |
84 default: | 86 default: |
85 break; | 87 break; |
86 } | 88 } |
87 | 89 |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst); | 596 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst); |
595 } | 597 } |
596 | 598 |
597 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { | 599 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { |
598 if (render_frame_ && render_frame_->GetWebFrame()) | 600 if (render_frame_ && render_frame_->GetWebFrame()) |
599 return render_frame_->GetWebFrame()->document(); | 601 return render_frame_->GetWebFrame()->document(); |
600 return WebDocument(); | 602 return WebDocument(); |
601 } | 603 } |
602 | 604 |
603 } // namespace content | 605 } // namespace content |
OLD | NEW |