Refactor accessibility event messages.

Accessibility update messages and callbacks should all take:
* A tree ID (sometimes implicit)
* A single AXTreeUpdate representing a tree mutation
* Zero or more accessibility events

For historical reasons, most messages had a tree update inside each event.
This made sense before, but now we're moving towards events being mostly
implicit, so it should be more natural to send a tree update with no events.
There's no need for multiple tree updates since it's more efficient to just
merge multiple updates into the same AXTreeUpdate.

This was intended to be a pure-refactoring change with no side effects,
however one small logic change was needed to render_accessibility_impl.cc
to ensure the same node doesn't get serialized into an AXTreeUpdate twice.

It will make it easier to land future changes to make events more implicit.

Bug: 699438
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I3c8b4e98240d0e5d0497d886d7d2498931301c2e
Reviewed-on: https://chromium-review.googlesource.com/592848
Commit-Queue: Dominic Mazzoni <[email protected]>
Reviewed-by: Tom Sepez <[email protected]>
Reviewed-by: John Abd-El-Malek <[email protected]>
Reviewed-by: Nico Weber <[email protected]>
Reviewed-by: Alice Boxhall <[email protected]>
Cr-Commit-Position: refs/heads/master@{#492276}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index a7ed1cf8..5b69037 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2651,16 +2651,19 @@
   return accessibility_mode_;
 }
 
-void WebContentsImpl::AccessibilityEventReceived(
-    const std::vector<AXEventNotificationDetails>& details) {
+void WebContentsImpl::AccessibilityEventsReceived(
+    ui::AXTreeIDRegistry::AXTreeID ax_tree_id,
+    const ui::AXTreeUpdate& update,
+    const std::vector<AXEventNotificationDetails>& events) {
   for (auto& observer : observers_)
-    observer.AccessibilityEventReceived(details);
+    observer.AccessibilityEventsReceived(ax_tree_id, update, events);
 }
 
 void WebContentsImpl::AccessibilityLocationChangesReceived(
+    ui::AXTreeIDRegistry::AXTreeID ax_tree_id,
     const std::vector<AXLocationChangeNotificationDetails>& details) {
   for (auto& observer : observers_)
-    observer.AccessibilityLocationChangesReceived(details);
+    observer.AccessibilityLocationChangesReceived(ax_tree_id, details);
 }
 
 RenderFrameHost* WebContentsImpl::GetGuestByInstanceID(