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

Unified Diff: chrome/browser/renderer_context_menu/render_view_context_menu.cc

Issue 913663002: Fix for Incomplete context menu is shown on pdf files and reload,back,forward options are missing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 years, 10 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 | components/renderer_context_menu/render_view_context_menu_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d8e0ccfb443f62e5f8f7e8112b7495e6fcd870f2..87097f85be51b826d03fb770b86361b7750513ab 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -762,20 +762,9 @@ void RenderViewContextMenu::AppendMediaItems() {
}
void RenderViewContextMenu::AppendPluginItems() {
- 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);
- }
+ // Full page plugin, so show page menu items.
raymes 2015/02/13 00:40:27 Please remove this comment as it's inaccurate now.
Deepak 2015/02/13 04:31:49 Done.
+ if (params_.link_url.is_empty() && params_.selection_text.empty())
+ AppendPageItems();
}
void RenderViewContextMenu::AppendPageItems() {
@@ -1787,6 +1776,9 @@ void RenderViewContextMenu::MediaPlayerActionAt(
void RenderViewContextMenu::PluginActionAt(
const gfx::Point& location,
const WebPluginAction& action) {
- source_web_contents_->GetRenderViewHost()->
- ExecutePluginActionAtLocation(location, action);
+ RenderFrameHost* render_frame_host = GetRenderFrameHost();
+ if (!render_frame_host)
+ return;
+ WebContents::FromRenderFrameHost(render_frame_host)->GetRenderViewHost()
+ ->ExecutePluginActionAtLocation(location, action);
}
« no previous file with comments | « no previous file | components/renderer_context_menu/render_view_context_menu_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698