| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 if (document.isNull()) | 91 if (document.isNull()) |
| 92 return; | 92 return; |
| 93 | 93 |
| 94 if (node.isNull()) { | 94 if (node.isNull()) { |
| 95 // When focus is cleared, implicitly focus the document. | 95 // When focus is cleared, implicitly focus the document. |
| 96 // TODO(dmazzoni): Make Blink send this notification instead. | 96 // TODO(dmazzoni): Make Blink send this notification instead. |
| 97 HandleAXEvent(document.accessibilityObject(), ui::AX_EVENT_BLUR); | 97 HandleAXEvent(document.accessibilityObject(), ui::AX_EVENT_BLUR); |
| 98 } | 98 } |
| 99 } | 99 } |
| 100 | 100 |
| 101 void RendererAccessibilityComplete::DidFinishLoad(blink::WebFrame* frame) { | 101 void RendererAccessibilityComplete::DidFinishLoad(blink::WebLocalFrame* frame) { |
| 102 const WebDocument& document = GetMainDocument(); | 102 const WebDocument& document = GetMainDocument(); |
| 103 if (document.isNull()) | 103 if (document.isNull()) |
| 104 return; | 104 return; |
| 105 | 105 |
| 106 // Check to see if the root accessibility object has changed, to work | 106 // Check to see if the root accessibility object has changed, to work |
| 107 // around Blink bugs that cause AXObjectCache to be cleared | 107 // around Blink bugs that cause AXObjectCache to be cleared |
| 108 // unnecessarily. | 108 // unnecessarily. |
| 109 // TODO(dmazzoni): remove this once rdar://5794454 is fixed. | 109 // TODO(dmazzoni): remove this once rdar://5794454 is fixed. |
| 110 WebAXObject new_root = document.accessibilityObject(); | 110 WebAXObject new_root = document.accessibilityObject(); |
| 111 if (!browser_root_ || new_root.axID() != browser_root_->id) | 111 if (!browser_root_ || new_root.axID() != browser_root_->id) |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 render_view()->GetWebView()->clearFocusedElement(); | 623 render_view()->GetWebView()->clearFocusedElement(); |
| 624 else | 624 else |
| 625 obj.setFocused(true); | 625 obj.setFocused(true); |
| 626 } | 626 } |
| 627 | 627 |
| 628 void RendererAccessibilityComplete::OnFatalError() { | 628 void RendererAccessibilityComplete::OnFatalError() { |
| 629 CHECK(false) << "Invalid accessibility tree."; | 629 CHECK(false) << "Invalid accessibility tree."; |
| 630 } | 630 } |
| 631 | 631 |
| 632 } // namespace content | 632 } // namespace content |
| OLD | NEW |