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

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

Issue 1389273003: 'View source code' option should be disabled in context menu for 'Paper Toolbar' of 'Pdf Viewer" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 58c38603bc9b9e6ae64344d07ccfbd529ca08126..d1a8e162c7a968c091c1bada82e9438d87b9991c 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -1153,7 +1153,9 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
case IDC_VIEW_SOURCE:
case IDC_CONTENT_CONTEXT_VIEWFRAMESOURCE:
- return (params_.media_type != WebContextMenuData::MediaTypePlugin) &&
+ // If we're viewing in a MimeHandlerViewGuest source will not be viewed.
+ return !extensions::MimeHandlerViewGuest::FromWebContents(
lazyboy 2015/10/08 18:35:39 Wouldn't this start showing view source for plugin
Deepak 2015/10/09 05:29:05 "view source" for the plugin elements will be disa
lazyboy 2015/10/09 15:46:38 For regular plugins (not PDF, say flash), we'd get
+ source_web_contents_) &&
embedder_web_contents_->GetController().CanViewSource();
case IDC_CONTENT_CONTEXT_INSPECTELEMENT:
« 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