| Index: content/browser/frame_host/render_frame_host_impl.h
|
| diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
|
| index 67ee5d52858553fc8608c7bb5691aa1006b2411d..f2198c830969f8dd40c14f702f9a77488a5b4bf1 100644
|
| --- a/content/browser/frame_host/render_frame_host_impl.h
|
| +++ b/content/browser/frame_host/render_frame_host_impl.h
|
| @@ -90,6 +90,9 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
| : public RenderFrameHost,
|
| public BrowserAccessibilityDelegate {
|
| public:
|
| + typedef base::Callback<void(const ui::AXTreeUpdate&)>
|
| + AXTreeSnapshotCallback;
|
| +
|
| // Keeps track of the state of the RenderFrameHostImpl, particularly with
|
| // respect to swap out.
|
| enum RenderFrameHostImplState {
|
| @@ -365,6 +368,10 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
| // Send a message to the renderer process to change the accessibility mode.
|
| void SetAccessibilityMode(AccessibilityMode AccessibilityMode);
|
|
|
| + // Request a one-time snapshot of the accessibility tree without changing
|
| + // the accessibility mode.
|
| + void RequestAXTreeSnapshot(AXTreeSnapshotCallback callback);
|
| +
|
| // Turn on accessibility testing. The given callback will be run
|
| // every time an accessibility notification is received from the
|
| // renderer process, and the accessibility tree it sent can be
|
| @@ -507,6 +514,8 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
| const std::vector<AccessibilityHostMsg_LocationChangeParams>& params);
|
| void OnAccessibilityFindInPageResult(
|
| const AccessibilityHostMsg_FindInPageResultParams& params);
|
| + void OnAccessibilitySnapshotResponse(int token,
|
| + const ui::AXTreeUpdate& snapshot);
|
| void OnToggleFullscreen(bool enter_fullscreen);
|
|
|
| #if defined(OS_MACOSX) || defined(OS_ANDROID)
|
| @@ -677,6 +686,10 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
| // we don't keep trying to reset forever.
|
| int accessibility_reset_count_;
|
|
|
| + // The mapping from request id to corresponding callback for pending
|
| + // accessibility tree snapshot calls created by RequestAXTreeSnapshot.
|
| + std::map<int, AXTreeSnapshotCallback> ax_tree_snapshot_callbacks_;
|
| +
|
| // Callback when an event is received, for testing.
|
| base::Callback<void(ui::AXEvent, int)> accessibility_testing_callback_;
|
| // The most recently received accessibility tree - for testing only.
|
|
|