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

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

Issue 1255573005: Create FrameNavigationEntries for the initial blank page in subframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comments Created 5 years, 5 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
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/profiler/scoped_tracker.h" 10 #include "base/profiler/scoped_tracker.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 navigator_(navigator), 79 navigator_(navigator),
80 render_manager_(this, 80 render_manager_(this,
81 render_frame_delegate, 81 render_frame_delegate,
82 render_view_delegate, 82 render_view_delegate,
83 render_widget_delegate, 83 render_widget_delegate,
84 manager_delegate), 84 manager_delegate),
85 frame_tree_node_id_(next_frame_tree_node_id_++), 85 frame_tree_node_id_(next_frame_tree_node_id_++),
86 parent_(NULL), 86 parent_(NULL),
87 opener_(nullptr), 87 opener_(nullptr),
88 opener_observer_(nullptr), 88 opener_observer_(nullptr),
89 has_committed_real_load_(false),
89 replication_state_(scope, name, sandbox_flags), 90 replication_state_(scope, name, sandbox_flags),
90 // Effective sandbox flags also need to be set, since initial sandbox 91 // Effective sandbox flags also need to be set, since initial sandbox
91 // flags should apply to the initial empty document in the frame. 92 // flags should apply to the initial empty document in the frame.
92 effective_sandbox_flags_(sandbox_flags), 93 effective_sandbox_flags_(sandbox_flags),
93 loading_progress_(kLoadingProgressNotStarted) { 94 loading_progress_(kLoadingProgressNotStarted) {
94 std::pair<FrameTreeNodeIDMap::iterator, bool> result = 95 std::pair<FrameTreeNodeIDMap::iterator, bool> result =
95 g_frame_tree_node_id_map.Get().insert( 96 g_frame_tree_node_id_map.Get().insert(
96 std::make_pair(frame_tree_node_id_, this)); 97 std::make_pair(frame_tree_node_id_, this));
97 CHECK(result.second); 98 CHECK(result.second);
98 } 99 }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 181
181 opener_ = opener; 182 opener_ = opener;
182 183
183 if (opener_) { 184 if (opener_) {
184 if (!opener_observer_) 185 if (!opener_observer_)
185 opener_observer_ = make_scoped_ptr(new OpenerDestroyedObserver(this)); 186 opener_observer_ = make_scoped_ptr(new OpenerDestroyedObserver(this));
186 opener_->AddObserver(opener_observer_.get()); 187 opener_->AddObserver(opener_observer_.get());
187 } 188 }
188 } 189 }
189 190
191 void FrameTreeNode::SetCurrentURL(const GURL& url) {
192 if (!has_committed_real_load_ && url != GURL(url::kAboutBlankURL))
193 has_committed_real_load_ = true;
194 current_url_ = url;
195 }
196
190 void FrameTreeNode::SetCurrentOrigin( 197 void FrameTreeNode::SetCurrentOrigin(
191 const url::DeprecatedSerializedOrigin& origin) { 198 const url::DeprecatedSerializedOrigin& origin) {
192 if (!origin.IsSameAs(replication_state_.origin)) 199 if (!origin.IsSameAs(replication_state_.origin))
193 render_manager_.OnDidUpdateOrigin(origin); 200 render_manager_.OnDidUpdateOrigin(origin);
194 replication_state_.origin = origin; 201 replication_state_.origin = origin;
195 } 202 }
196 203
197 void FrameTreeNode::SetFrameName(const std::string& name) { 204 void FrameTreeNode::SetFrameName(const std::string& name) {
198 if (name != replication_state_.name) 205 if (name != replication_state_.name)
199 render_manager_.OnDidUpdateName(name); 206 render_manager_.OnDidUpdateName(name);
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 // TODO(nasko): see if child frames should send IPCs in site-per-process 378 // TODO(nasko): see if child frames should send IPCs in site-per-process
372 // mode. 379 // mode.
373 if (!IsMainFrame()) 380 if (!IsMainFrame())
374 return true; 381 return true;
375 382
376 render_manager_.Stop(); 383 render_manager_.Stop();
377 return true; 384 return true;
378 } 385 }
379 386
380 } // namespace content 387 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_tree_node.h ('k') | content/browser/frame_host/navigation_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698