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

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

Issue 281653003: DRAFT CL: Add FrameNavigationEntry and track subframe session histories. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 5 years, 9 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
« no previous file with comments | « content/browser/frame_host/frame_navigation_entry.cc ('k') | content/browser/frame_host/frame_tree_node.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/frame_tree_node.h
diff --git a/content/browser/frame_host/frame_tree_node.h b/content/browser/frame_host/frame_tree_node.h
index 458887baaf6403ba538c8775fadf7fbf695e1ba6..0c5bb60f991a9a258dce7e962eceafdfc61119d5 100644
--- a/content/browser/frame_host/frame_tree_node.h
+++ b/content/browser/frame_host/frame_tree_node.h
@@ -11,6 +11,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
+#include "content/browser/frame_host/frame_navigation_entry.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/frame_host/render_frame_host_manager.h"
#include "content/common/content_export.h"
@@ -84,12 +85,19 @@ class CONTENT_EXPORT FrameTreeNode {
return children_[index];
}
- const GURL& current_url() const {
- return current_url_;
+ FrameNavigationEntry* last_committed_frame_entry() {
+ return last_committed_frame_entry_.get();
+ }
+
+ void set_last_committed_frame_entry(FrameNavigationEntry* entry) {
+ last_committed_frame_entry_ = entry;
}
- void set_current_url(const GURL& url) {
- current_url_ = url;
+ // TODO(creis): Rename to last_committed_url().
+ const GURL& current_url() const {
+ if (last_committed_frame_entry_)
+ return last_committed_frame_entry_->url();
+ return GURL::EmptyGURL();
}
void set_current_origin(const url::Origin& origin) {
@@ -158,11 +166,9 @@ class CONTENT_EXPORT FrameTreeNode {
// The immediate children of this specific frame.
ScopedVector<FrameTreeNode> children_;
- // Track the current frame's last committed URL, so we can estimate the
- // process impact of out-of-process iframes.
- // TODO(creis): Remove this when we can store subframe URLs in the
- // NavigationController.
- GURL current_url_;
+ // Track the current frame's last committed FrameNavigationEntry, which lets
+ // other callers know what the last committed URL is.
+ scoped_refptr<FrameNavigationEntry> last_committed_frame_entry_;
// Track information that needs to be replicated to processes that have
// proxies for this frame.
« no previous file with comments | « content/browser/frame_host/frame_navigation_entry.cc ('k') | content/browser/frame_host/frame_tree_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698