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

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

Issue 1628423002: Add frameId to chrome.tabs.executeScript/insertCSS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permissiondata-remove-process_id
Patch Set: Nits + comments Created 4 years, 11 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 b63e42f97ae449665f31b6d4dd9aa7dda3e85098..cfa704f882db0565ccffd701055f640c63777234 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -318,6 +318,18 @@ RenderFrameHost* RenderFrameHostImpl::GetParent() {
return parent_node->current_frame_host();
}
+void RenderFrameHostImpl::ForEachChildFrame(
+ const base::Callback<void(RenderFrameHost*)>& on_frame) {
+ if (this != frame_tree_node_->current_frame_host()) {
jam 2016/01/26 23:42:34 why is this needed?
robwu 2016/01/26 23:57:59 Just in case someone calls ForEachChildFrame on a
+ NOTREACHED();
+ return;
+ }
+ for (size_t i = 0; i < frame_tree_node_->child_count(); ++i) {
+ FrameTreeNode* child = frame_tree_node_->child_at(i);
+ on_frame.Run(child->current_frame_host());
+ }
+}
+
int RenderFrameHostImpl::GetFrameTreeNodeId() {
return frame_tree_node_->frame_tree_node_id();
}

Powered by Google App Engine
This is Rietveld 408576698