| 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 48f26e1980b4de763683f91c9614bb7b2db06e9b..c6e1d4a620ba3f4ae460589d0a0ecfff94475eab 100644
|
| --- a/chrome/renderer/chrome_content_renderer_client.cc
|
| +++ b/chrome/renderer/chrome_content_renderer_client.cc
|
| @@ -687,11 +687,19 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
|
|
| if ((status_value ==
|
| ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized ||
|
| + status_value == ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay ||
|
| status_value == ChromeViewHostMsg_GetPluginInfo_Status::kBlocked) &&
|
| observer->IsPluginTemporarilyAllowed(identifier)) {
|
| status_value = ChromeViewHostMsg_GetPluginInfo_Status::kAllowed;
|
| }
|
|
|
| + // Allow full-screen plug-ins for left-click-to-play.
|
| + if (status_value == ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay &&
|
| + !frame->parent() && !frame->opener() &&
|
| + frame->document().isPluginDocument()) {
|
| + status_value = ChromeViewHostMsg_GetPluginInfo_Status::kAllowed;
|
| + }
|
| +
|
| #if defined(ENABLE_PLUGINS)
|
| if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| switches::kEnablePluginPowerSaver)) {
|
| @@ -888,6 +896,16 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
| observer->DidBlockContentType(content_type, group_name);
|
| break;
|
| }
|
| + case ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay: {
|
| + placeholder = create_blocked_plugin(
|
| + IDR_CLICK_TO_PLAY_PLUGIN_HTML,
|
| + l10n_util::GetStringFUTF16(IDS_PLUGIN_LOAD, group_name), GURL());
|
| + placeholder->set_allow_loading(true);
|
| + RenderThread::Get()->RecordAction(
|
| + UserMetricsAction("Plugin_ClickToPlay"));
|
| + observer->DidBlockContentType(content_type, group_name);
|
| + break;
|
| + }
|
| case ChromeViewHostMsg_GetPluginInfo_Status::kBlocked: {
|
| placeholder = create_blocked_plugin(
|
| IDR_BLOCKED_PLUGIN_HTML,
|
|
|