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

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

Issue 1305043003: Unncessary 'View source code' option is enabled in context menu of the 'Pdf Viewer' app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 years, 3 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/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 e7b57ee9ec29b050e78c5c5b519e5f7d9eddf515..fc5ae9c571c60da9c4bac490f75a0c234bddfb36 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -1146,7 +1146,8 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
case IDC_VIEW_SOURCE:
case IDC_CONTENT_CONTEXT_VIEWFRAMESOURCE:
- return embedder_web_contents_->GetController().CanViewSource();
+ return (params_.media_type != WebContextMenuData::MediaTypePlugin) &&
+ embedder_web_contents_->GetController().CanViewSource();
case IDC_CONTENT_CONTEXT_INSPECTELEMENT:
case IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE:
« 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