OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 // renderer process, and the accessibility tree it sent can be | 451 // renderer process, and the accessibility tree it sent can be |
452 // retrieved using GetAXTreeForTesting(). | 452 // retrieved using GetAXTreeForTesting(). |
453 void SetAccessibilityCallbackForTesting( | 453 void SetAccessibilityCallbackForTesting( |
454 const base::Callback<void(ui::AXEvent, int)>& callback); | 454 const base::Callback<void(ui::AXEvent, int)>& callback); |
455 | 455 |
456 // Called when the metadata about the accessibility tree for this frame | 456 // Called when the metadata about the accessibility tree for this frame |
457 // changes due to a browser-side change, as opposed to due to an IPC from | 457 // changes due to a browser-side change, as opposed to due to an IPC from |
458 // a renderer. | 458 // a renderer. |
459 void UpdateAXTreeData(); | 459 void UpdateAXTreeData(); |
460 | 460 |
| 461 // Set the AX tree ID of the embedder RFHI, if this is a browser plugin guest. |
| 462 void set_browser_plugin_embedder_ax_tree_id( |
| 463 AXTreeIDRegistry::AXTreeID ax_tree_id) { |
| 464 browser_plugin_embedder_ax_tree_id_ = ax_tree_id; |
| 465 } |
| 466 |
461 // Send a message to the render process to change text track style settings. | 467 // Send a message to the render process to change text track style settings. |
462 void SetTextTrackSettings(const FrameMsg_TextTrackSettings_Params& params); | 468 void SetTextTrackSettings(const FrameMsg_TextTrackSettings_Params& params); |
463 | 469 |
464 // Returns a snapshot of the accessibility tree received from the | 470 // Returns a snapshot of the accessibility tree received from the |
465 // renderer as of the last time an accessibility notification was | 471 // renderer as of the last time an accessibility notification was |
466 // received. | 472 // received. |
467 const ui::AXTree* GetAXTreeForTesting(); | 473 const ui::AXTree* GetAXTreeForTesting(); |
468 | 474 |
469 // Access the BrowserAccessibilityManager if it already exists. | 475 // Access the BrowserAccessibilityManager if it already exists. |
470 BrowserAccessibilityManager* browser_accessibility_manager() const { | 476 BrowserAccessibilityManager* browser_accessibility_manager() const { |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 // assigned) and a complete replacement accessibility tree. | 883 // assigned) and a complete replacement accessibility tree. |
878 int accessibility_reset_token_; | 884 int accessibility_reset_token_; |
879 | 885 |
880 // A count of the number of times we needed to reset accessibility, so | 886 // A count of the number of times we needed to reset accessibility, so |
881 // we don't keep trying to reset forever. | 887 // we don't keep trying to reset forever. |
882 int accessibility_reset_count_; | 888 int accessibility_reset_count_; |
883 | 889 |
884 // The last AXContentTreeData for this frame received from the RenderFrame. | 890 // The last AXContentTreeData for this frame received from the RenderFrame. |
885 AXContentTreeData ax_content_tree_data_; | 891 AXContentTreeData ax_content_tree_data_; |
886 | 892 |
| 893 // The AX tree ID of the embedder, if this is a browser plugin guest. |
| 894 AXTreeIDRegistry::AXTreeID browser_plugin_embedder_ax_tree_id_; |
| 895 |
887 // The mapping from callback id to corresponding callback for pending | 896 // The mapping from callback id to corresponding callback for pending |
888 // accessibility tree snapshot calls created by RequestAXTreeSnapshot. | 897 // accessibility tree snapshot calls created by RequestAXTreeSnapshot. |
889 std::map<int, AXTreeSnapshotCallback> ax_tree_snapshot_callbacks_; | 898 std::map<int, AXTreeSnapshotCallback> ax_tree_snapshot_callbacks_; |
890 | 899 |
891 // Callback when an event is received, for testing. | 900 // Callback when an event is received, for testing. |
892 base::Callback<void(ui::AXEvent, int)> accessibility_testing_callback_; | 901 base::Callback<void(ui::AXEvent, int)> accessibility_testing_callback_; |
893 // The most recently received accessibility tree - for testing only. | 902 // The most recently received accessibility tree - for testing only. |
894 scoped_ptr<ui::AXTree> ax_tree_for_testing_; | 903 scoped_ptr<ui::AXTree> ax_tree_for_testing_; |
895 // Flag to not create a BrowserAccessibilityManager, for testing. If one | 904 // Flag to not create a BrowserAccessibilityManager, for testing. If one |
896 // already exists it will still be used. | 905 // already exists it will still be used. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 | 954 |
946 // NOTE: This must be the last member. | 955 // NOTE: This must be the last member. |
947 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 956 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
948 | 957 |
949 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 958 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
950 }; | 959 }; |
951 | 960 |
952 } // namespace content | 961 } // namespace content |
953 | 962 |
954 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 963 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |