| 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/browser_plugin/browser_plugin_guest.h" | 5 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1158 return; | 1158 return; |
| 1159 | 1159 |
| 1160 extra_attach_params_.reset(extra_params.DeepCopy()); | 1160 extra_attach_params_.reset(extra_params.DeepCopy()); |
| 1161 | 1161 |
| 1162 // Clear parameters that get inherited from the opener. | 1162 // Clear parameters that get inherited from the opener. |
| 1163 params.storage_partition_id.clear(); | 1163 params.storage_partition_id.clear(); |
| 1164 params.persist_storage = false; | 1164 params.persist_storage = false; |
| 1165 params.src.clear(); | 1165 params.src.clear(); |
| 1166 | 1166 |
| 1167 // If a RenderView has already been created for this new window, then we need | 1167 // If a RenderView has already been created for this new window, then we need |
| 1168 // to initialize the browser-side state now so that the RenderViewHostManager | 1168 // to initialize the browser-side state now so that the RenderFrameHostManager |
| 1169 // does not create a new RenderView on navigation. | 1169 // does not create a new RenderView on navigation. |
| 1170 if (has_render_view_) { | 1170 if (has_render_view_) { |
| 1171 static_cast<RenderViewHostImpl*>( | 1171 static_cast<RenderViewHostImpl*>( |
| 1172 GetWebContents()->GetRenderViewHost())->Init(); | 1172 GetWebContents()->GetRenderViewHost())->Init(); |
| 1173 WebContentsViewGuest* new_view = | 1173 WebContentsViewGuest* new_view = |
| 1174 static_cast<WebContentsViewGuest*>(GetWebContents()->GetView()); | 1174 static_cast<WebContentsViewGuest*>(GetWebContents()->GetView()); |
| 1175 new_view->CreateViewForWidget(web_contents()->GetRenderViewHost()); | 1175 new_view->CreateViewForWidget(web_contents()->GetRenderViewHost()); |
| 1176 } | 1176 } |
| 1177 | 1177 |
| 1178 // We need to do a navigation here if the target URL has changed between | 1178 // We need to do a navigation here if the target URL has changed between |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1741 request_info.Set(browser_plugin::kRequestMethod, | 1741 request_info.Set(browser_plugin::kRequestMethod, |
| 1742 base::Value::CreateStringValue(request_method)); | 1742 base::Value::CreateStringValue(request_method)); |
| 1743 request_info.Set(browser_plugin::kURL, base::Value::CreateStringValue(url)); | 1743 request_info.Set(browser_plugin::kURL, base::Value::CreateStringValue(url)); |
| 1744 | 1744 |
| 1745 RequestPermission(BROWSER_PLUGIN_PERMISSION_TYPE_DOWNLOAD, | 1745 RequestPermission(BROWSER_PLUGIN_PERMISSION_TYPE_DOWNLOAD, |
| 1746 new DownloadRequest(callback), | 1746 new DownloadRequest(callback), |
| 1747 request_info); | 1747 request_info); |
| 1748 } | 1748 } |
| 1749 | 1749 |
| 1750 } // namespace content | 1750 } // namespace content |
| OLD | NEW |