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

Side by Side Diff: content/browser/frame_host/frame_tree_node.cc

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/frame_tree_node.h" 5 #include "content/browser/frame_host/frame_tree_node.h"
6 6
7 #include <queue> 7 #include <queue>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // Subtle: we need to make sure the node is gone from the tree before 105 // Subtle: we need to make sure the node is gone from the tree before
106 // observers are notified of its deletion. 106 // observers are notified of its deletion.
107 scoped_ptr<FrameTreeNode> node_to_delete(*iter); 107 scoped_ptr<FrameTreeNode> node_to_delete(*iter);
108 children_.weak_erase(iter); 108 children_.weak_erase(iter);
109 node_to_delete->set_parent(NULL); 109 node_to_delete->set_parent(NULL);
110 node_to_delete.reset(); 110 node_to_delete.reset();
111 } 111 }
112 } 112 }
113 113
114 void FrameTreeNode::ResetForNewProcess() { 114 void FrameTreeNode::ResetForNewProcess() {
115 current_url_ = GURL(); 115 last_committed_frame_entry_ = nullptr;
116 116
117 // The children may not have been cleared if a cross-process navigation 117 // The children may not have been cleared if a cross-process navigation
118 // commits before the old process cleans everything up. Make sure the child 118 // commits before the old process cleans everything up. Make sure the child
119 // nodes get deleted before swapping to a new process. 119 // nodes get deleted before swapping to a new process.
120 ScopedVector<FrameTreeNode> old_children = children_.Pass(); 120 ScopedVector<FrameTreeNode> old_children = children_.Pass();
121 old_children.clear(); // May notify observers. 121 old_children.clear(); // May notify observers.
122 } 122 }
123 123
124 void FrameTreeNode::SetFrameName(const std::string& name) { 124 void FrameTreeNode::SetFrameName(const std::string& name) {
125 replication_state_.name = name; 125 replication_state_.name = name;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 164
165 bool FrameTreeNode::CommitPendingSandboxFlags() { 165 bool FrameTreeNode::CommitPendingSandboxFlags() {
166 bool did_change_flags = 166 bool did_change_flags =
167 effective_sandbox_flags_ != replication_state_.sandbox_flags; 167 effective_sandbox_flags_ != replication_state_.sandbox_flags;
168 effective_sandbox_flags_ = replication_state_.sandbox_flags; 168 effective_sandbox_flags_ = replication_state_.sandbox_flags;
169 return did_change_flags; 169 return did_change_flags;
170 } 170 }
171 171
172 } // namespace content 172 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_tree_node.h ('k') | content/browser/frame_host/navigation_controller_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698