Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(785)

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2837603002: Content API changes to improve DOM stitching in ThreatDetails code. (Closed)
Patch Set: Remove unnecessary deps Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698