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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 10091030: Allow full-page plug-ins for click-to-play. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disallow plug-ins in popups Created 8 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 5f902a2065b2d5cdf99e1b3b61b50ee9b0a920a8..9b9fb6c28689e489efb40f11cf509d0ab0bd73e1 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -366,6 +366,14 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
status_value = ChromeViewHostMsg_GetPluginInfo_Status::kAllowed;
}
+ // Allow full-page plug-ins for click-to-play.
+ if (status_value == ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay &&
+ !frame->parent() &&
+ !frame->opener() &&
+ frame->document().isPluginDocument()) {
+ status_value = ChromeViewHostMsg_GetPluginInfo_Status::kAllowed;
+ }
+
switch (status_value) {
case ChromeViewHostMsg_GetPluginInfo_Status::kNotFound: {
NOTREACHED();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698