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

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

Issue 1079163008: PlzNavigate: provide the FrameTreeNode ID to the network stack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-unittests
Patch Set: Now using FTN id or routing ID Created 5 years, 7 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 effective_sandbox_flags_ != replication_state_.sandbox_flags; 173 effective_sandbox_flags_ != replication_state_.sandbox_flags;
174 effective_sandbox_flags_ = replication_state_.sandbox_flags; 174 effective_sandbox_flags_ = replication_state_.sandbox_flags;
175 return did_change_flags; 175 return did_change_flags;
176 } 176 }
177 177
178 void FrameTreeNode::SetNavigationRequest( 178 void FrameTreeNode::SetNavigationRequest(
179 scoped_ptr<NavigationRequest> navigation_request) { 179 scoped_ptr<NavigationRequest> navigation_request) {
180 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( 180 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
181 switches::kEnableBrowserSideNavigation)); 181 switches::kEnableBrowserSideNavigation));
182 ResetNavigationRequest(false); 182 ResetNavigationRequest(false);
183 DidStartLoading(true);
nasko 2015/04/27 14:24:11 Does that and the DidStopLoading code fix issues o
clamy 2015/04/27 14:34:44 No this was a test patch that I uploaded and was r
183 // TODO(clamy): perform the StartLoading logic here. 184 // TODO(clamy): perform the StartLoading logic here.
184 navigation_request_ = navigation_request.Pass(); 185 navigation_request_ = navigation_request.Pass();
185 } 186 }
186 187
187 void FrameTreeNode::ResetNavigationRequest(bool is_commit) { 188 void FrameTreeNode::ResetNavigationRequest(bool is_commit) {
188 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( 189 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
189 switches::kEnableBrowserSideNavigation)); 190 switches::kEnableBrowserSideNavigation));
190 // Upon commit the current NavigationRequest will be reset. There should be no 191 // Upon commit the current NavigationRequest will be reset. There should be no
191 // cleanup performed since the navigation is still ongoing. If the reset 192 // cleanup performed since the navigation is still ongoing. If the reset
192 // corresponds to a cancelation, the RenderFrameHostManager should clean up 193 // corresponds to a cancelation, the RenderFrameHostManager should clean up
193 // any speculative RenderFrameHost it created for the navigation. 194 // any speculative RenderFrameHost it created for the navigation.
194 if (navigation_request_ && !is_commit) { 195 if (navigation_request_ && !is_commit) {
196 DidStopLoading();
195 // TODO(clamy): perform the StopLoading logic. 197 // TODO(clamy): perform the StopLoading logic.
196 render_manager_.CleanUpNavigation(); 198 render_manager_.CleanUpNavigation();
197 } 199 }
198 navigation_request_.reset(); 200 navigation_request_.reset();
199 } 201 }
200 202
201 bool FrameTreeNode::has_started_loading() const { 203 bool FrameTreeNode::has_started_loading() const {
202 return loading_progress_ != kLoadingProgressNotStarted; 204 return loading_progress_ != kLoadingProgressNotStarted;
203 } 205 }
204 206
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 FROM_HERE_WITH_EXPLICIT_FUNCTION( 259 FROM_HERE_WITH_EXPLICIT_FUNCTION(
258 "465796 FrameTreeNode::DidStopLoading::End")); 260 "465796 FrameTreeNode::DidStopLoading::End"));
259 } 261 }
260 262
261 void FrameTreeNode::DidChangeLoadProgress(double load_progress) { 263 void FrameTreeNode::DidChangeLoadProgress(double load_progress) {
262 loading_progress_ = load_progress; 264 loading_progress_ = load_progress;
263 frame_tree_->UpdateLoadProgress(); 265 frame_tree_->UpdateLoadProgress();
264 } 266 }
265 267
266 } // namespace content 268 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698