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/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1139 delegate_->LostMouseLock(); | 1139 delegate_->LostMouseLock(); |
1140 } | 1140 } |
1141 | 1141 |
1142 void WebContentsImpl::CreateNewWindow( | 1142 void WebContentsImpl::CreateNewWindow( |
1143 int route_id, | 1143 int route_id, |
1144 const ViewHostMsg_CreateWindow_Params& params, | 1144 const ViewHostMsg_CreateWindow_Params& params, |
1145 SessionStorageNamespace* session_storage_namespace) { | 1145 SessionStorageNamespace* session_storage_namespace) { |
1146 if (delegate_ && !delegate_->ShouldCreateWebContents( | 1146 if (delegate_ && !delegate_->ShouldCreateWebContents( |
1147 this, route_id, params.window_container_type, params.frame_name, | 1147 this, route_id, params.window_container_type, params.frame_name, |
1148 params.target_url)) { | 1148 params.target_url)) { |
| 1149 GetRenderViewHost()->GetProcess()->ResumeRequestsForView(route_id); |
1149 return; | 1150 return; |
1150 } | 1151 } |
1151 | 1152 |
1152 // We usually create the new window in the same BrowsingInstance (group of | 1153 // We usually create the new window in the same BrowsingInstance (group of |
1153 // script-related windows), by passing in the current SiteInstance. However, | 1154 // script-related windows), by passing in the current SiteInstance. However, |
1154 // if the opener is being suppressed, we create a new SiteInstance in its own | 1155 // if the opener is being suppressed, we create a new SiteInstance in its own |
1155 // BrowsingInstance. | 1156 // BrowsingInstance. |
1156 scoped_refptr<SiteInstance> site_instance = | 1157 scoped_refptr<SiteInstance> site_instance = |
1157 params.opener_suppressed ? | 1158 params.opener_suppressed ? |
1158 SiteInstance::Create(GetBrowserContext()) : | 1159 SiteInstance::Create(GetBrowserContext()) : |
(...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3116 browser_plugin_host()->embedder_render_process_host(); | 3117 browser_plugin_host()->embedder_render_process_host(); |
3117 *embedder_container_id = browser_plugin_host()->instance_id(); | 3118 *embedder_container_id = browser_plugin_host()->instance_id(); |
3118 int embedder_process_id = | 3119 int embedder_process_id = |
3119 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; | 3120 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; |
3120 if (embedder_process_id != -1) { | 3121 if (embedder_process_id != -1) { |
3121 *embedder_channel_name = | 3122 *embedder_channel_name = |
3122 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), | 3123 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), |
3123 embedder_process_id); | 3124 embedder_process_id); |
3124 } | 3125 } |
3125 } | 3126 } |
OLD | NEW |