| OLD | NEW |
| 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 return current_frame_host->is_loading(); | 242 return current_frame_host->is_loading(); |
| 243 } | 243 } |
| 244 | 244 |
| 245 bool FrameTreeNode::CommitPendingSandboxFlags() { | 245 bool FrameTreeNode::CommitPendingSandboxFlags() { |
| 246 bool did_change_flags = | 246 bool did_change_flags = |
| 247 effective_sandbox_flags_ != replication_state_.sandbox_flags; | 247 effective_sandbox_flags_ != replication_state_.sandbox_flags; |
| 248 effective_sandbox_flags_ = replication_state_.sandbox_flags; | 248 effective_sandbox_flags_ = replication_state_.sandbox_flags; |
| 249 return did_change_flags; | 249 return did_change_flags; |
| 250 } | 250 } |
| 251 | 251 |
| 252 void FrameTreeNode::SetNavigationRequest( | 252 void FrameTreeNode::CreatedNavigationRequest( |
| 253 scoped_ptr<NavigationRequest> navigation_request) { | 253 scoped_ptr<NavigationRequest> navigation_request) { |
| 254 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( | 254 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 255 switches::kEnableBrowserSideNavigation)); | 255 switches::kEnableBrowserSideNavigation)); |
| 256 ResetNavigationRequest(false); | 256 ResetNavigationRequest(false); |
| 257 | 257 |
| 258 // Force the throbber to start to keep it in sync with what is happening in | 258 // Force the throbber to start to keep it in sync with what is happening in |
| 259 // the UI. Blink doesn't send throb notifications for JavaScript URLs, so it | 259 // the UI. Blink doesn't send throb notifications for JavaScript URLs, so it |
| 260 // is not done here either. | 260 // is not done here either. |
| 261 if (!navigation_request->common_params().url.SchemeIs( | 261 if (!navigation_request->common_params().url.SchemeIs( |
| 262 url::kJavaScriptScheme)) { | 262 url::kJavaScriptScheme)) { |
| 263 // TODO(fdegans): Check if this is a same-document navigation and set the | 263 // TODO(fdegans): Check if this is a same-document navigation and set the |
| 264 // proper argument. | 264 // proper argument. |
| 265 DidStartLoading(true); | 265 DidStartLoading(true); |
| 266 } | 266 } |
| 267 | 267 |
| 268 navigation_request_ = navigation_request.Pass(); | 268 navigation_request_ = navigation_request.Pass(); |
| 269 |
| 270 render_manager()->DidCreateNavigationRequest(*navigation_request_); |
| 269 } | 271 } |
| 270 | 272 |
| 271 void FrameTreeNode::ResetNavigationRequest(bool is_commit) { | 273 void FrameTreeNode::ResetNavigationRequest(bool is_commit) { |
| 272 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( | 274 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 273 switches::kEnableBrowserSideNavigation)); | 275 switches::kEnableBrowserSideNavigation)); |
| 274 if (!navigation_request_) | 276 if (!navigation_request_) |
| 275 return; | 277 return; |
| 276 navigation_request_.reset(); | 278 navigation_request_.reset(); |
| 277 | 279 |
| 278 // During commit, the clean up of a speculative RenderFrameHost is done in | 280 // During commit, the clean up of a speculative RenderFrameHost is done in |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 349 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 348 "465796 FrameTreeNode::DidStopLoading::End")); | 350 "465796 FrameTreeNode::DidStopLoading::End")); |
| 349 } | 351 } |
| 350 | 352 |
| 351 void FrameTreeNode::DidChangeLoadProgress(double load_progress) { | 353 void FrameTreeNode::DidChangeLoadProgress(double load_progress) { |
| 352 loading_progress_ = load_progress; | 354 loading_progress_ = load_progress; |
| 353 frame_tree_->UpdateLoadProgress(); | 355 frame_tree_->UpdateLoadProgress(); |
| 354 } | 356 } |
| 355 | 357 |
| 356 } // namespace content | 358 } // namespace content |
| OLD | NEW |