| 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.h" | 5 #include "content/renderer/accessibility/renderer_accessibility.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 } | 231 } |
| 232 | 232 |
| 233 void RendererAccessibility::SendPendingAccessibilityEvents() { | 233 void RendererAccessibility::SendPendingAccessibilityEvents() { |
| 234 const WebDocument& document = GetMainDocument(); | 234 const WebDocument& document = GetMainDocument(); |
| 235 if (document.isNull()) | 235 if (document.isNull()) |
| 236 return; | 236 return; |
| 237 | 237 |
| 238 if (pending_events_.empty()) | 238 if (pending_events_.empty()) |
| 239 return; | 239 return; |
| 240 | 240 |
| 241 if (render_frame_->is_swapped_out()) | |
| 242 return; | |
| 243 | |
| 244 ack_pending_ = true; | 241 ack_pending_ = true; |
| 245 | 242 |
| 246 // Make a copy of the events, because it's possible that | 243 // Make a copy of the events, because it's possible that |
| 247 // actions inside this loop will cause more events to be | 244 // actions inside this loop will cause more events to be |
| 248 // queued up. | 245 // queued up. |
| 249 std::vector<AccessibilityHostMsg_EventParams> src_events = pending_events_; | 246 std::vector<AccessibilityHostMsg_EventParams> src_events = pending_events_; |
| 250 pending_events_.clear(); | 247 pending_events_.clear(); |
| 251 | 248 |
| 252 // Generate an event message from each Blink event. | 249 // Generate an event message from each Blink event. |
| 253 std::vector<AccessibilityHostMsg_EventParams> event_msgs; | 250 std::vector<AccessibilityHostMsg_EventParams> event_msgs; |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 #ifndef NDEBUG | 579 #ifndef NDEBUG |
| 583 LOG(WARNING) << "ShowContextMenu on invalid object id " << acc_obj_id; | 580 LOG(WARNING) << "ShowContextMenu on invalid object id " << acc_obj_id; |
| 584 #endif | 581 #endif |
| 585 return; | 582 return; |
| 586 } | 583 } |
| 587 | 584 |
| 588 obj.showContextMenu(); | 585 obj.showContextMenu(); |
| 589 } | 586 } |
| 590 | 587 |
| 591 } // namespace content | 588 } // namespace content |
| OLD | NEW |