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.h" | 10 #include "base/message_loop.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 RendererAccessibilityComplete::BrowserTreeNode::~BrowserTreeNode() {} | 242 RendererAccessibilityComplete::BrowserTreeNode::~BrowserTreeNode() {} |
243 | 243 |
244 void RendererAccessibilityComplete::SendPendingAccessibilityNotifications() { | 244 void RendererAccessibilityComplete::SendPendingAccessibilityNotifications() { |
245 const WebDocument& document = GetMainDocument(); | 245 const WebDocument& document = GetMainDocument(); |
246 if (document.isNull()) | 246 if (document.isNull()) |
247 return; | 247 return; |
248 | 248 |
249 if (pending_notifications_.empty()) | 249 if (pending_notifications_.empty()) |
250 return; | 250 return; |
251 | 251 |
| 252 if (render_view_->is_swapped_out()) |
| 253 return; |
| 254 |
252 ack_pending_ = true; | 255 ack_pending_ = true; |
253 | 256 |
254 // Make a copy of the notifications, because it's possible that | 257 // Make a copy of the notifications, because it's possible that |
255 // actions inside this loop will cause more notifications to be | 258 // actions inside this loop will cause more notifications to be |
256 // queued up. | 259 // queued up. |
257 std::vector<AccessibilityHostMsg_NotificationParams> src_notifications = | 260 std::vector<AccessibilityHostMsg_NotificationParams> src_notifications = |
258 pending_notifications_; | 261 pending_notifications_; |
259 pending_notifications_.clear(); | 262 pending_notifications_.clear(); |
260 | 263 |
261 // Generate a notification message from each WebKit notification. | 264 // Generate a notification message from each WebKit notification. |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 render_view()->GetWebView()->clearFocusedNode(); | 704 render_view()->GetWebView()->clearFocusedNode(); |
702 else | 705 else |
703 obj.setFocused(true); | 706 obj.setFocused(true); |
704 } | 707 } |
705 | 708 |
706 void RendererAccessibilityComplete::OnFatalError() { | 709 void RendererAccessibilityComplete::OnFatalError() { |
707 CHECK(false) << "Invalid accessibility tree."; | 710 CHECK(false) << "Invalid accessibility tree."; |
708 } | 711 } |
709 | 712 |
710 } // namespace content | 713 } // namespace content |
OLD | NEW |