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

Unified Diff: content/browser/frame_host/frame_tree.h

Issue 1104603002: Pick frame to navigate in the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test cases Created 5 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/frame_tree.h
diff --git a/content/browser/frame_host/frame_tree.h b/content/browser/frame_host/frame_tree.h
index ce34bc287f1ea9ad6206d832666dd762b078f9fd..f0a8bbc618eb30048ef28dfd888ba21eb7cff7c5 100644
--- a/content/browser/frame_host/frame_tree.h
+++ b/content/browser/frame_host/frame_tree.h
@@ -59,6 +59,12 @@ class CONTENT_EXPORT FrameTree {
// Returns the FrameTreeNode with the given renderer-specific |routing_id|.
FrameTreeNode* FindByRoutingID(int process_id, int routing_id);
+ // Returns the first frame in this tree with the given |name|, or the main
+ // frame if |name| is empty.
+ // Note that this does NOT support pseudo-names like _self, _top, and _blank,
+ // nor searching other FrameTrees (unlike blink::WebView::findFrameByName).
+ FrameTreeNode* FindByName(const std::string& name);
+
// Executes |on_node| on each node in the frame tree. If |on_node| returns
// false, terminates the iteration immediately. Returning false is useful
// if |on_node| is just doing a search over the tree. The iteration proceeds
« no previous file with comments | « components/sessions/content/content_serialized_navigation_builder.cc ('k') | content/browser/frame_host/frame_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698