Chromium Code Reviews| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1361 CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context)); | 1361 CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context)); |
| 1362 | 1362 |
| 1363 if (delegate_ && | 1363 if (delegate_ && |
| 1364 !delegate_->ShouldCreateWebContents(this, | 1364 !delegate_->ShouldCreateWebContents(this, |
| 1365 route_id, | 1365 route_id, |
| 1366 params.window_container_type, | 1366 params.window_container_type, |
| 1367 params.frame_name, | 1367 params.frame_name, |
| 1368 params.target_url, | 1368 params.target_url, |
| 1369 partition_id, | 1369 partition_id, |
| 1370 session_storage_namespace)) { | 1370 session_storage_namespace)) { |
| 1371 if (!RenderViewHost::FromID(render_process_id, route_id)) { | |
| 1372 // If the embedder didn't create a WebContents for this route, we need to | |
| 1373 // delete the RenderView that had already been created. | |
| 1374 Send(new ViewMsg_Close(route_id)); | |
|
jochen (gone - plz use gerrit)
2014/01/07 08:10:38
route_id might be MSG_ROUTING_NONE.
in that case,
jam
2014/01/07 19:37:32
Done.
| |
| 1375 } | |
| 1371 GetRenderViewHost()->GetProcess()->ResumeRequestsForView(route_id); | 1376 GetRenderViewHost()->GetProcess()->ResumeRequestsForView(route_id); |
| 1372 GetRenderViewHost()->GetProcess()->ResumeRequestsForView( | 1377 GetRenderViewHost()->GetProcess()->ResumeRequestsForView( |
| 1373 main_frame_route_id); | 1378 main_frame_route_id); |
| 1374 return; | 1379 return; |
| 1375 } | 1380 } |
| 1376 | 1381 |
| 1377 // Create the new web contents. This will automatically create the new | 1382 // Create the new web contents. This will automatically create the new |
| 1378 // WebContentsView. In the future, we may want to create the view separately. | 1383 // WebContentsView. In the future, we may want to create the view separately. |
| 1379 WebContentsImpl* new_contents = | 1384 WebContentsImpl* new_contents = |
| 1380 new WebContentsImpl(GetBrowserContext(), | 1385 new WebContentsImpl(GetBrowserContext(), |
| (...skipping 2515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3896 } | 3901 } |
| 3897 | 3902 |
| 3898 void WebContentsImpl::OnFrameRemoved( | 3903 void WebContentsImpl::OnFrameRemoved( |
| 3899 RenderViewHostImpl* render_view_host, | 3904 RenderViewHostImpl* render_view_host, |
| 3900 int64 frame_id) { | 3905 int64 frame_id) { |
| 3901 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3906 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 3902 FrameDetached(render_view_host, frame_id)); | 3907 FrameDetached(render_view_host, frame_id)); |
| 3903 } | 3908 } |
| 3904 | 3909 |
| 3905 } // namespace content | 3910 } // namespace content |
| OLD | NEW |