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

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

Issue 1422333009: OOPIF: History navigations for new child frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve comment. Created 5 years 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
« no previous file with comments | « content/browser/frame_host/navigation_entry_impl.h ('k') | content/browser/frame_host/navigator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_entry_impl.cc
diff --git a/content/browser/frame_host/navigation_entry_impl.cc b/content/browser/frame_host/navigation_entry_impl.cc
index 8102a4748341027439ce7bdc7faa5cf836baa5ae..694985aca8d0ad0a52054082f2eea5f4edd0f5db 100644
--- a/content/browser/frame_host/navigation_entry_impl.cc
+++ b/content/browser/frame_host/navigation_entry_impl.cc
@@ -596,6 +596,24 @@ FrameNavigationEntry* NavigationEntryImpl::GetFrameEntry(
return tree_node ? tree_node->frame_entry.get() : nullptr;
}
+FrameNavigationEntry* NavigationEntryImpl::GetFrameEntryByUniqueName(
+ const std::string& unique_name) const {
+ NavigationEntryImpl::TreeNode* node = nullptr;
+ std::queue<NavigationEntryImpl::TreeNode*> work_queue;
+ work_queue.push(root_node());
+ while (!work_queue.empty()) {
+ node = work_queue.front();
+ work_queue.pop();
+ if (node->frame_entry->frame_unique_name() == unique_name)
+ return node->frame_entry.get();
+
+ // Enqueue any children and keep looking.
+ for (auto& child : node->children)
+ work_queue.push(child);
+ }
+ return nullptr;
+}
+
void NavigationEntryImpl::SetScreenshotPNGData(
scoped_refptr<base::RefCountedBytes> png_data) {
screenshot_ = png_data;
« no previous file with comments | « content/browser/frame_host/navigation_entry_impl.h ('k') | content/browser/frame_host/navigator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698