| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/navigation_request.h" | 5 #include "content/browser/frame_host/navigation_request.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "content/browser/devtools/render_frame_devtools_agent_host.h" | 9 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
| 10 #include "content/browser/frame_host/frame_tree.h" | 10 #include "content/browser/frame_host/frame_tree.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 begin_params_(begin_params), | 159 begin_params_(begin_params), |
| 160 request_params_(request_params), | 160 request_params_(request_params), |
| 161 browser_initiated_(browser_initiated), | 161 browser_initiated_(browser_initiated), |
| 162 state_(NOT_STARTED), | 162 state_(NOT_STARTED), |
| 163 restore_type_(NavigationEntryImpl::RESTORE_NONE), | 163 restore_type_(NavigationEntryImpl::RESTORE_NONE), |
| 164 is_view_source_(false), | 164 is_view_source_(false), |
| 165 bindings_(NavigationEntryImpl::kInvalidBindings), | 165 bindings_(NavigationEntryImpl::kInvalidBindings), |
| 166 associated_site_instance_type_(AssociatedSiteInstanceType::NONE) { | 166 associated_site_instance_type_(AssociatedSiteInstanceType::NONE) { |
| 167 DCHECK(!browser_initiated || (entry != nullptr && frame_entry != nullptr)); | 167 DCHECK(!browser_initiated || (entry != nullptr && frame_entry != nullptr)); |
| 168 if (browser_initiated) { | 168 if (browser_initiated) { |
| 169 // TODO(clamy): use the FrameNavigationEntry for the source SiteInstance | 169 FrameNavigationEntry* frame_entry = entry->GetFrameEntry(frame_tree_node); |
| 170 // once it has been moved from the NavigationEntry. | 170 if (frame_entry) |
| 171 source_site_instance_ = entry->source_site_instance(); | 171 source_site_instance_ = frame_entry->source_site_instance(); |
| 172 |
| 172 dest_site_instance_ = frame_entry->site_instance(); | 173 dest_site_instance_ = frame_entry->site_instance(); |
| 173 restore_type_ = entry->restore_type(); | 174 restore_type_ = entry->restore_type(); |
| 174 is_view_source_ = entry->IsViewSourceMode(); | 175 is_view_source_ = entry->IsViewSourceMode(); |
| 175 bindings_ = entry->bindings(); | 176 bindings_ = entry->bindings(); |
| 176 } else { | 177 } else { |
| 177 // This is needed to have about:blank and data URLs commit in the same | 178 // This is needed to have about:blank and data URLs commit in the same |
| 178 // SiteInstance as the initiating renderer. | 179 // SiteInstance as the initiating renderer. |
| 179 source_site_instance_ = | 180 source_site_instance_ = |
| 180 frame_tree_node->current_frame_host()->GetSiteInstance(); | 181 frame_tree_node->current_frame_host()->GetSiteInstance(); |
| 181 } | 182 } |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 browser_context, navigating_frame_host->GetSiteInstance()); | 453 browser_context, navigating_frame_host->GetSiteInstance()); |
| 453 DCHECK(partition); | 454 DCHECK(partition); |
| 454 | 455 |
| 455 ServiceWorkerContextWrapper* service_worker_context = | 456 ServiceWorkerContextWrapper* service_worker_context = |
| 456 static_cast<ServiceWorkerContextWrapper*>( | 457 static_cast<ServiceWorkerContextWrapper*>( |
| 457 partition->GetServiceWorkerContext()); | 458 partition->GetServiceWorkerContext()); |
| 458 navigation_handle_->InitServiceWorkerHandle(service_worker_context); | 459 navigation_handle_->InitServiceWorkerHandle(service_worker_context); |
| 459 } | 460 } |
| 460 | 461 |
| 461 } // namespace content | 462 } // namespace content |
| OLD | NEW |