Chromium Code Reviews| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 179 bool FrameTreeNode::IsLoading() const { | 179 bool FrameTreeNode::IsLoading() const { |
| 180 RenderFrameHostImpl* current_frame_host = | 180 RenderFrameHostImpl* current_frame_host = |
| 181 render_manager_.current_frame_host(); | 181 render_manager_.current_frame_host(); |
| 182 RenderFrameHostImpl* pending_frame_host = | 182 RenderFrameHostImpl* pending_frame_host = |
| 183 render_manager_.pending_frame_host(); | 183 render_manager_.pending_frame_host(); |
| 184 | 184 |
| 185 DCHECK(current_frame_host); | 185 DCHECK(current_frame_host); |
| 186 | 186 |
| 187 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 187 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 188 switches::kEnableBrowserSideNavigation)) { | 188 switches::kEnableBrowserSideNavigation)) { |
| 189 if (navigation_request_) | 189 if (navigation_request_ && |
| 190 !navigation_request_->common_params().url.SchemeIs( | |
| 191 url::kJavaScriptScheme)) | |
|
nasko
2015/05/29 14:17:46
Why not keep it closer to existing functionality?
clamy
2015/05/29 16:02:06
We cannot use a RFH to set the loading state as we
nasko
2015/06/01 20:38:22
Do we even create NavigationRequest objects for JS
clamy
2015/06/02 12:28:16
After further thinking, I removed this part, and n
| |
| 190 return true; | 192 return true; |
| 191 } else { | 193 } else { |
| 192 if (pending_frame_host && pending_frame_host->is_loading()) | 194 if (pending_frame_host && pending_frame_host->is_loading()) |
| 193 return true; | 195 return true; |
| 194 } | 196 } |
| 195 return current_frame_host->is_loading(); | 197 return current_frame_host->is_loading(); |
| 196 } | 198 } |
| 197 | 199 |
| 198 bool FrameTreeNode::CommitPendingSandboxFlags() { | 200 bool FrameTreeNode::CommitPendingSandboxFlags() { |
| 199 bool did_change_flags = | 201 bool did_change_flags = |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 300 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 302 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 301 "465796 FrameTreeNode::DidStopLoading::End")); | 303 "465796 FrameTreeNode::DidStopLoading::End")); |
| 302 } | 304 } |
| 303 | 305 |
| 304 void FrameTreeNode::DidChangeLoadProgress(double load_progress) { | 306 void FrameTreeNode::DidChangeLoadProgress(double load_progress) { |
| 305 loading_progress_ = load_progress; | 307 loading_progress_ = load_progress; |
| 306 frame_tree_->UpdateLoadProgress(); | 308 frame_tree_->UpdateLoadProgress(); |
| 307 } | 309 } |
| 308 | 310 |
| 309 } // namespace content | 311 } // namespace content |
| OLD | NEW |