| 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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 2081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2092 DOMStorageContextWrapper* dom_storage_context = | 2092 DOMStorageContextWrapper* dom_storage_context = |
| 2093 static_cast<DOMStorageContextWrapper*>(partition->GetDOMStorageContext()); | 2093 static_cast<DOMStorageContextWrapper*>(partition->GetDOMStorageContext()); |
| 2094 SessionStorageNamespaceImpl* session_storage_namespace_impl = | 2094 SessionStorageNamespaceImpl* session_storage_namespace_impl = |
| 2095 static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace); | 2095 static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace); |
| 2096 CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context)); | 2096 CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context)); |
| 2097 | 2097 |
| 2098 if (delegate_ && | 2098 if (delegate_ && |
| 2099 !delegate_->ShouldCreateWebContents( | 2099 !delegate_->ShouldCreateWebContents( |
| 2100 this, source_site_instance, render_view_route_id, main_frame_route_id, | 2100 this, source_site_instance, render_view_route_id, main_frame_route_id, |
| 2101 main_frame_widget_route_id, params.window_container_type, | 2101 main_frame_widget_route_id, params.window_container_type, |
| 2102 params.opener_url, params.frame_name, params.target_url, partition_id, | 2102 opener->GetLastCommittedURL(), params.frame_name, params.target_url, |
| 2103 session_storage_namespace)) { | 2103 partition_id, session_storage_namespace)) { |
| 2104 // Note: even though we're not creating a WebContents here, it could have | 2104 // Note: even though we're not creating a WebContents here, it could have |
| 2105 // been created by the embedder so ensure that the RenderFrameHost is | 2105 // been created by the embedder so ensure that the RenderFrameHost is |
| 2106 // properly initialized. | 2106 // properly initialized. |
| 2107 // It's safe to only target the frame because the render process will not | 2107 // It's safe to only target the frame because the render process will not |
| 2108 // have a chance to create more frames at this point. | 2108 // have a chance to create more frames at this point. |
| 2109 RenderFrameHostImpl* rfh = | 2109 RenderFrameHostImpl* rfh = |
| 2110 RenderFrameHostImpl::FromID(render_process_id, main_frame_route_id); | 2110 RenderFrameHostImpl::FromID(render_process_id, main_frame_route_id); |
| 2111 if (rfh) { | 2111 if (rfh) { |
| 2112 DCHECK(rfh->IsRenderFrameLive()); | 2112 DCHECK(rfh->IsRenderFrameLive()); |
| 2113 rfh->Init(); | 2113 rfh->Init(); |
| (...skipping 3358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5472 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); | 5472 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); |
| 5473 if (!render_view_host) | 5473 if (!render_view_host) |
| 5474 continue; | 5474 continue; |
| 5475 render_view_host_set.insert(render_view_host); | 5475 render_view_host_set.insert(render_view_host); |
| 5476 } | 5476 } |
| 5477 for (RenderViewHost* render_view_host : render_view_host_set) | 5477 for (RenderViewHost* render_view_host : render_view_host_set) |
| 5478 render_view_host->OnWebkitPreferencesChanged(); | 5478 render_view_host->OnWebkitPreferencesChanged(); |
| 5479 } | 5479 } |
| 5480 | 5480 |
| 5481 } // namespace content | 5481 } // namespace content |
| OLD | NEW |