summaryrefslogtreecommitdiffstats
path: root/content/renderer/accessibility
diff options
context:
space:
mode:
authoraboxhall <aboxhall@chromium.org>2014-08-28 16:24:30 -0700
committerCommit bot <commit-bot@chromium.org>2014-08-28 23:27:03 +0000
commit62ea4420572a57354518d9081e4150889b836d88 (patch)
treecdad62f1625786e1cadb76f7343cb9498ef81c8d /content/renderer/accessibility
parent2252c70ca5b411daaa7afacfe18c545b4357bd7f (diff)
downloadchromium_src-62ea4420572a57354518d9081e4150889b836d88.zip
chromium_src-62ea4420572a57354518d9081e4150889b836d88.tar.gz
chromium_src-62ea4420572a57354518d9081e4150889b836d88.tar.bz2
Use both APIs for enabling accessibility
https://codereview.chromium.org/491483006 BUG=406622 Review URL: https://codereview.chromium.org/497263002 Cr-Commit-Position: refs/heads/master@{#292490}
Diffstat (limited to 'content/renderer/accessibility')
-rw-r--r--content/renderer/accessibility/renderer_accessibility_complete.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/content/renderer/accessibility/renderer_accessibility_complete.cc b/content/renderer/accessibility/renderer_accessibility_complete.cc
index be1cde8..11b5cbf 100644
--- a/content/renderer/accessibility/renderer_accessibility_complete.cc
+++ b/content/renderer/accessibility/renderer_accessibility_complete.cc
@@ -13,17 +13,21 @@
#include "content/renderer/render_view_impl.h"
#include "third_party/WebKit/public/web/WebAXObject.h"
#include "third_party/WebKit/public/web/WebDocument.h"
+#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebInputElement.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebNode.h"
+#include "third_party/WebKit/public/web/WebSettings.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "ui/accessibility/ax_tree.h"
using blink::WebAXObject;
using blink::WebDocument;
+using blink::WebFrame;
using blink::WebNode;
using blink::WebPoint;
using blink::WebRect;
+using blink::WebSettings;
using blink::WebView;
namespace content {
@@ -37,12 +41,16 @@ RendererAccessibilityComplete::RendererAccessibilityComplete(
last_scroll_offset_(gfx::Size()),
ack_pending_(false) {
WebAXObject::enableAccessibility();
+ WebView* web_view = render_frame_->GetRenderView()->GetWebView();
+ WebSettings* settings = web_view->settings();
+ settings->setAccessibilityEnabled(true);
#if !defined(OS_ANDROID)
// Skip inline text boxes on Android - since there are no native Android
// APIs that compute the bounds of a range of text, it's a waste to
// include these in the AX tree.
WebAXObject::enableInlineTextBoxAccessibility();
+ settings->setInlineTextBoxAccessibilityEnabled(true);
#endif
const WebDocument& document = GetMainDocument();