| Index: chrome/renderer/plugins/chrome_plugin_placeholder.cc
|
| diff --git a/chrome/renderer/plugins/chrome_plugin_placeholder.cc b/chrome/renderer/plugins/chrome_plugin_placeholder.cc
|
| index c40e8e47dea5cee9aa67f0a231ab56c286af30b8..dce392ed27b6a83ee5d83b8b4daa83023b110e21 100644
|
| --- a/chrome/renderer/plugins/chrome_plugin_placeholder.cc
|
| +++ b/chrome/renderer/plugins/chrome_plugin_placeholder.cc
|
| @@ -313,6 +313,10 @@ void ChromePluginPlaceholder::OnMenuAction(int request_id, unsigned action) {
|
| HidePlugin();
|
| break;
|
| }
|
| + case chrome::MENU_COMMAND_ENABLE_FLASH: {
|
| + ShowPermissionBubbleCallback();
|
| + break;
|
| + }
|
| default:
|
| NOTREACHED();
|
| }
|
| @@ -345,7 +349,9 @@ void ChromePluginPlaceholder::ShowContextMenu(
|
| params.custom_items.push_back(separator_item);
|
| }
|
|
|
| - if (!GetPluginInfo().path.value().empty()) {
|
| + bool flash_hidden =
|
| + status_ == ChromeViewHostMsg_GetPluginInfo_Status::kFlashHiddenPreferHtml;
|
| + if (!GetPluginInfo().path.value().empty() && !flash_hidden) {
|
| content::MenuItem run_item;
|
| run_item.action = chrome::MENU_COMMAND_PLUGIN_RUN;
|
| // Disable this menu item if the plugin is blocked by policy.
|
| @@ -354,6 +360,15 @@ void ChromePluginPlaceholder::ShowContextMenu(
|
| params.custom_items.push_back(run_item);
|
| }
|
|
|
| + if (flash_hidden) {
|
| + content::MenuItem enable_flash_item;
|
| + enable_flash_item.action = chrome::MENU_COMMAND_ENABLE_FLASH;
|
| + enable_flash_item.enabled = true;
|
| + enable_flash_item.label =
|
| + l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_ENABLE_FLASH);
|
| + params.custom_items.push_back(enable_flash_item);
|
| + }
|
| +
|
| content::MenuItem hide_item;
|
| hide_item.action = chrome::MENU_COMMAND_PLUGIN_HIDE;
|
| bool is_main_frame_plugin_document =
|
|
|