Add a WebContentsImpl API to snapshot the accessibility tree.

Depends on: https://codereview.chromium.org/1053773002/

BUG=472704

Review URL: https://codereview.chromium.org/1051923003

Cr-Commit-Position: refs/heads/master@{#325011}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 5a41d12..4777b22 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -722,6 +722,13 @@
   SetAccessibilityMode(RemoveAccessibilityModeFrom(accessibility_mode_, mode));
 }
 
+void WebContentsImpl::RequestAXTreeSnapshot(AXTreeSnapshotCallback callback) {
+  // TODO(dmazzoni): http://crbug.com/475608 This only returns the
+  // accessibility tree from the main frame and everything in the
+  // same site instance.
+  GetMainFrame()->RequestAXTreeSnapshot(callback);
+}
+
 void WebContentsImpl::ClearNavigationTransitionData() {
   FrameTreeNode* node = frame_tree_.root();
   node->render_manager()->ClearNavigationTransitionData();