| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/devtools/render_frame_devtools_agent_host.h" | 5 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
| 6 | 6 |
| 7 #include <tuple> | 7 #include <tuple> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/guid.h" | 10 #include "base/guid.h" |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 | 650 |
| 651 if (!IsBrowserSideNavigationEnabled()) { | 651 if (!IsBrowserSideNavigationEnabled()) { |
| 652 if (navigation_handle->HasCommitted() && | 652 if (navigation_handle->HasCommitted() && |
| 653 !navigation_handle->IsErrorPage()) { | 653 !navigation_handle->IsErrorPage()) { |
| 654 if (pending_ && | 654 if (pending_ && |
| 655 pending_->host() == navigation_handle->GetRenderFrameHost()) { | 655 pending_->host() == navigation_handle->GetRenderFrameHost()) { |
| 656 CommitPending(); | 656 CommitPending(); |
| 657 } | 657 } |
| 658 if (session()) | 658 if (session()) |
| 659 protocol::TargetHandler::FromSession(session())->UpdateServiceWorkers(); | 659 protocol::TargetHandler::FromSession(session())->UpdateServiceWorkers(); |
| 660 } else if (pending_ && | 660 } else if (pending_ && pending_->host()->GetFrameTreeNodeId() == |
| 661 pending_->host() == navigation_handle->GetRenderFrameHost()) { | 661 navigation_handle->GetFrameTreeNodeId()) { |
| 662 DiscardPending(); | 662 DiscardPending(); |
| 663 } | 663 } |
| 664 DCHECK(CheckConsistency()); | 664 DCHECK(CheckConsistency()); |
| 665 return; | 665 return; |
| 666 } | 666 } |
| 667 | 667 |
| 668 // If the navigation is not tracked, return; | 668 // If the navigation is not tracked, return; |
| 669 if (navigating_handles_.count(navigation_handle) == 0) | 669 if (navigating_handles_.count(navigation_handle) == 0) |
| 670 return; | 670 return; |
| 671 | 671 |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1178 RenderFrameHost* host) { | 1178 RenderFrameHost* host) { |
| 1179 return (current_ && current_->host() == host) || | 1179 return (current_ && current_->host() == host) || |
| 1180 (pending_ && pending_->host() == host); | 1180 (pending_ && pending_->host() == host); |
| 1181 } | 1181 } |
| 1182 | 1182 |
| 1183 bool RenderFrameDevToolsAgentHost::IsChildFrame() { | 1183 bool RenderFrameDevToolsAgentHost::IsChildFrame() { |
| 1184 return current_ && current_->host()->GetParent(); | 1184 return current_ && current_->host()->GetParent(); |
| 1185 } | 1185 } |
| 1186 | 1186 |
| 1187 } // namespace content | 1187 } // namespace content |
| OLD | NEW |