Index: content/browser/frame_host/render_frame_host_impl.cc |
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc |
index b730c3ceb69613d7a01279273b6cfe417b43273a..5e36e384a65785f2396d86bc379ffdc39f8e529a 100644 |
--- a/content/browser/frame_host/render_frame_host_impl.cc |
+++ b/content/browser/frame_host/render_frame_host_impl.cc |
@@ -3381,6 +3381,22 @@ bool RenderFrameHostImpl::CanExecuteJavaScript() { |
(delegate_->GetAsWebContents() == nullptr); |
} |
+// static |
+int RenderFrameHost::LookupOtherFrameTreeNodeId(int process_id, |
+ int routing_id) { |
+ // Note: this code is copied/modified from RoutingIDToAXTreeID (below). |
dmazzoni
2017/05/01 20:10:07
Let's try to share this and come up with a cleaner
lpz
2017/05/02 19:36:24
Done.
|
+ RenderFrameProxyHost* rfph = |
+ RenderFrameProxyHost::FromID(process_id, routing_id); |
+ if (rfph) { |
+ return rfph->frame_tree_node()->frame_tree_node_id(); |
+ } else { |
+ RenderFrameHost* rfh = RenderFrameHost::FromID(process_id, routing_id); |
+ if (rfh) |
+ return rfh->GetFrameTreeNodeId(); |
+ } |
+ return -1; |
dmazzoni
2017/05/01 20:10:07
Is there a constant somewhere like kNoFrameTreeNod
lpz
2017/05/02 19:36:24
Couldn't find one so added it.
|
+} |
+ |
ui::AXTreeIDRegistry::AXTreeID RenderFrameHostImpl::RoutingIDToAXTreeID( |
int routing_id) { |
RenderFrameHostImpl* rfh = nullptr; |