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 #include "content/renderer/accessibility/renderer_accessibility_complete.h" | 5 #include "content/renderer/accessibility/renderer_accessibility_complete.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 namespace content { | 29 namespace content { |
30 | 30 |
31 RendererAccessibilityComplete::RendererAccessibilityComplete( | 31 RendererAccessibilityComplete::RendererAccessibilityComplete( |
32 RenderViewImpl* render_view) | 32 RenderViewImpl* render_view) |
33 : RendererAccessibility(render_view), | 33 : RendererAccessibility(render_view), |
34 weak_factory_(this), | 34 weak_factory_(this), |
35 browser_root_(NULL), | 35 browser_root_(NULL), |
36 last_scroll_offset_(gfx::Size()), | 36 last_scroll_offset_(gfx::Size()), |
37 ack_pending_(false) { | 37 ack_pending_(false) { |
38 WebAXObject::enableAccessibility(); | 38 WebAXObject::enableAccessibility(); |
| 39 WebAXObject::enableInlineTextBoxAccessibility(); |
39 | 40 |
40 const WebDocument& document = GetMainDocument(); | 41 const WebDocument& document = GetMainDocument(); |
41 if (!document.isNull()) { | 42 if (!document.isNull()) { |
42 // It's possible that the webview has already loaded a webpage without | 43 // It's possible that the webview has already loaded a webpage without |
43 // accessibility being enabled. Initialize the browser's cached | 44 // accessibility being enabled. Initialize the browser's cached |
44 // accessibility tree by sending it a notification. | 45 // accessibility tree by sending it a notification. |
45 HandleWebAccessibilityEvent(document.accessibilityObject(), | 46 HandleWebAccessibilityEvent(document.accessibilityObject(), |
46 WebKit::WebAXEventLayoutComplete); | 47 WebKit::WebAXEventLayoutComplete); |
47 } | 48 } |
48 } | 49 } |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 render_view()->GetWebView()->clearFocusedNode(); | 621 render_view()->GetWebView()->clearFocusedNode(); |
621 else | 622 else |
622 obj.setFocused(true); | 623 obj.setFocused(true); |
623 } | 624 } |
624 | 625 |
625 void RendererAccessibilityComplete::OnFatalError() { | 626 void RendererAccessibilityComplete::OnFatalError() { |
626 CHECK(false) << "Invalid accessibility tree."; | 627 CHECK(false) << "Invalid accessibility tree."; |
627 } | 628 } |
628 | 629 |
629 } // namespace content | 630 } // namespace content |
OLD | NEW |