| Index: chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
| diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
| index 708622d66249ab1b7a71847b7024da2eac65aab0..d8e0ccfb443f62e5f8f7e8112b7495e6fcd870f2 100644
|
| --- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
| +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
| @@ -762,8 +762,20 @@
|
| }
|
|
|
| void RenderViewContextMenu::AppendPluginItems() {
|
| - if (params_.link_url.is_empty() && params_.selection_text.empty())
|
| - AppendPageItems();
|
| + if (params_.page_url == params_.src_url) {
|
| + // Full page plugin, so show page menu items.
|
| + if (params_.link_url.is_empty() && params_.selection_text.empty())
|
| + AppendPageItems();
|
| + } else {
|
| + menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_SAVEAVAS,
|
| + IDS_CONTENT_CONTEXT_SAVEPAGEAS);
|
| + // The "Print" menu item should always be included for plugins. If
|
| + // content_type_->SupportsGroup(ContextMenuContentType::ITEM_GROUP_PRINT)
|
| + // is true the item will be added inside AppendPrintItem(). Otherwise we
|
| + // add "Print" here.
|
| + if (!content_type_->SupportsGroup(ContextMenuContentType::ITEM_GROUP_PRINT))
|
| + menu_model_.AddItemWithStringId(IDC_PRINT, IDS_CONTENT_CONTEXT_PRINT);
|
| + }
|
| }
|
|
|
| void RenderViewContextMenu::AppendPageItems() {
|
| @@ -1775,9 +1787,6 @@
|
| void RenderViewContextMenu::PluginActionAt(
|
| const gfx::Point& location,
|
| const WebPluginAction& action) {
|
| - RenderFrameHost* render_frame_host = GetRenderFrameHost();
|
| - if (!render_frame_host)
|
| - return;
|
| - WebContents::FromRenderFrameHost(render_frame_host)->GetRenderViewHost()
|
| - ->ExecutePluginActionAtLocation(location, action);
|
| -}
|
| + source_web_contents_->GetRenderViewHost()->
|
| + ExecutePluginActionAtLocation(location, action);
|
| +}
|
|
|