diff options
author | dmazzoni <dmazzoni@chromium.org> | 2015-08-06 18:02:15 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-07 01:03:09 +0000 |
commit | 1efe8793da85ee6e25185175047c077adfe8e55c (patch) | |
tree | 3da8b088c3c997fca1d8b4e652819f8db1e415d9 /content/public/browser | |
parent | f54108dd9aa8b43982c206442664cb325cd792d7 (diff) | |
download | chromium_src-1efe8793da85ee6e25185175047c077adfe8e55c.zip chromium_src-1efe8793da85ee6e25185175047c077adfe8e55c.tar.gz chromium_src-1efe8793da85ee6e25185175047c077adfe8e55c.tar.bz2 |
Get rid of FrameAccessibility using AXTreeIDs
Depends on:
https://codereview.chromium.org/1257093005/
Instead of keeping track of the relationship between
frames in FrameAccessibility, create a subclass of
AXNodeData that's only allowed to be used within
the content module, and once an AX tree is received
in the browser process, convert routing IDs to
global AXTreeIDs that can be stored AXNodeData.
BUG=368298
Review URL: https://codereview.chromium.org/1267663002
Cr-Commit-Position: refs/heads/master@{#342251}
Diffstat (limited to 'content/public/browser')
-rw-r--r-- | content/public/browser/ax_event_notification_details.cc | 20 | ||||
-rw-r--r-- | content/public/browser/ax_event_notification_details.h | 20 | ||||
-rw-r--r-- | content/public/browser/render_frame_host.h | 6 |
3 files changed, 14 insertions, 32 deletions
diff --git a/content/public/browser/ax_event_notification_details.cc b/content/public/browser/ax_event_notification_details.cc index 8944f57..ead942c 100644 --- a/content/public/browser/ax_event_notification_details.cc +++ b/content/public/browser/ax_event_notification_details.cc @@ -6,22 +6,10 @@ namespace content { -AXEventNotificationDetails::AXEventNotificationDetails( - int node_id_to_clear, - const std::vector<ui::AXNodeData>& nodes, - ui::AXEvent event_type, - int id, - std::map<int32, int> node_to_browser_plugin_instance_id_map, - int process_id, - int routing_id) - : node_id_to_clear(node_id_to_clear), - nodes(nodes), - event_type(event_type), - id(id), - node_to_browser_plugin_instance_id_map( - node_to_browser_plugin_instance_id_map), - process_id(process_id), - routing_id(routing_id) { +AXEventNotificationDetails::AXEventNotificationDetails() + : event_type(ui::AX_EVENT_NONE), + id(-1), + ax_tree_id(-1) { } AXEventNotificationDetails::~AXEventNotificationDetails() {} diff --git a/content/public/browser/ax_event_notification_details.h b/content/public/browser/ax_event_notification_details.h index 4173b82..d4ee1d0 100644 --- a/content/public/browser/ax_event_notification_details.h +++ b/content/public/browser/ax_event_notification_details.h @@ -8,8 +8,7 @@ #include <vector> #include "content/common/content_export.h" -#include "ui/accessibility/ax_enums.h" -#include "ui/accessibility/ax_node_data.h" +#include "ui/accessibility/ax_tree_update.h" namespace content { @@ -17,24 +16,13 @@ namespace content { // |WebContentsObserver::AccessibilityEventReceived| method. struct CONTENT_EXPORT AXEventNotificationDetails { public: - AXEventNotificationDetails( - int node_id_to_clear, - const std::vector<ui::AXNodeData>& nodes, - ui::AXEvent event_type, - int id, - std::map<int32, int> node_to_browser_plugin_instance_id_map, - int process_id, - int routing_id); - + AXEventNotificationDetails(); ~AXEventNotificationDetails(); - int node_id_to_clear; - std::vector<ui::AXNodeData> nodes; + ui::AXTreeUpdate<ui::AXNodeData> update; ui::AXEvent event_type; int id; - std::map<int32, int> node_to_browser_plugin_instance_id_map; - int process_id; - int routing_id; + int ax_tree_id; }; } // namespace content diff --git a/content/public/browser/render_frame_host.h b/content/public/browser/render_frame_host.h index e47441d..0424979 100644 --- a/content/public/browser/render_frame_host.h +++ b/content/public/browser/render_frame_host.h @@ -40,11 +40,17 @@ class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, // configurations. static void AllowInjectingJavaScriptForAndroidWebView(); + // Returns a RenderFrameHost given its accessibility tree ID. + static RenderFrameHost* FromAXTreeID(int ax_tree_id); + ~RenderFrameHost() override {} // Returns the route id for this frame. virtual int GetRoutingID() = 0; + // Returns the accessibility tree ID for this RenderFrameHost. + virtual int GetAXTreeID() = 0; + // Returns the SiteInstance grouping all RenderFrameHosts that have script // access to this RenderFrameHost, and must therefore live in the same // process. |