Chromium Code Reviews| 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 283be24ef7bcbd431ae8bec34dc477a1823255b4..9ac9b8d174fe3f6526c1a990b151c691493335af 100644 |
| --- a/content/browser/frame_host/render_frame_host_impl.h |
| +++ b/content/browser/frame_host/render_frame_host_impl.h |
| @@ -91,6 +91,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 { |
| @@ -366,6 +369,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 |
| @@ -511,6 +518,8 @@ class CONTENT_EXPORT RenderFrameHostImpl |
| const std::vector<AccessibilityHostMsg_LocationChangeParams>& params); |
| void OnAccessibilityFindInPageResult( |
| const AccessibilityHostMsg_FindInPageResultParams& params); |
| + void OnAccessibilitySnapshotResponse(int callback_id, |
| + const ui::AXTreeUpdate& snapshot); |
| void OnToggleFullscreen(bool enter_fullscreen); |
| #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| @@ -681,6 +690,10 @@ class CONTENT_EXPORT RenderFrameHostImpl |
| // we don't keep trying to reset forever. |
| int accessibility_reset_count_; |
| + // The mapping from callback id to corresponding callback for pending |
| + // accessibility tree snapshot calls created by RequestAXTreeSnapshot. |
| + std::map<int, AXTreeSnapshotCallback> ax_tree_snapshot_callbacks_; |
|
dcheng
2015/04/10 22:49:00
Would it make sense to use IdMap here?
dmazzoni
2015/04/13 06:37:18
Thanks for making me aware of that, looks like an
dcheng
2015/04/13 22:32:14
If there's already precedent for that in this file
|
| + |
| // 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. |