Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Unified Diff: content/browser/browser_plugin/browser_plugin_embedder.cc

Issue 23530029: Support webview tag when the container extension is embedded in a webUI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/browser_plugin/browser_plugin_embedder.cc
diff --git a/content/browser/browser_plugin/browser_plugin_embedder.cc b/content/browser/browser_plugin/browser_plugin_embedder.cc
index 1f673ba520f09000b113aaa2b18ab7d0dda3050a..ad4279cdbd0e4b0e8033e93ba70eb66d9e19eaea 100644
--- a/content/browser/browser_plugin/browser_plugin_embedder.cc
+++ b/content/browser/browser_plugin/browser_plugin_embedder.cc
@@ -16,6 +16,7 @@
#include "content/public/browser/browser_context.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/native_web_keyboard_event.h"
+#include "content/public/browser/render_view_host.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/result_codes.h"
@@ -176,7 +177,11 @@ void BrowserPluginEmbedder::OnAttach(
BrowserPluginGuest* guest =
GetBrowserPluginGuestManager()->GetGuestByInstanceID(
instance_id, web_contents()->GetRenderProcessHost()->GetID());
-
+
+ RenderProcessHost* render_process_host =
+ web_contents()->GetRenderProcessHost();
+ GURL validated_frame_url(params.embedder_frame_url);
+ RenderViewHost::FilterURL(render_process_host, false, &validated_frame_url);
if (guest) {
// There is an implicit order expectation here:
@@ -187,6 +192,7 @@ void BrowserPluginEmbedder::OnAttach(
GetContentClient()->browser()->GuestWebContentsAttached(
guest->GetWebContents(),
web_contents(),
+ validated_frame_url,
extra_params);
guest->Attach(
static_cast<WebContentsImpl*>(web_contents()), params, extra_params);
@@ -202,6 +208,7 @@ void BrowserPluginEmbedder::OnAttach(
GetContentClient()->browser()->GuestWebContentsAttached(
guest->GetWebContents(),
web_contents(),
+ validated_frame_url,
extra_params);
guest->Initialize(static_cast<WebContentsImpl*>(web_contents()), params);
}
« no previous file with comments | « chrome/renderer/extensions/document_custom_bindings.cc ('k') | content/browser/browser_plugin/browser_plugin_guest_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698