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

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..9d0170fdba56b8ecc0800ea910c3a241bb5d1168 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -1153,6 +1153,10 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
case IDC_VIEW_SOURCE:
case IDC_CONTENT_CONTEXT_VIEWFRAMESOURCE:
+ if (!!extensions::MimeHandlerViewGuest::FromWebContents(
+ source_web_contents_)) {
+ return false;
+ }
return (params_.media_type != WebContextMenuData::MediaTypePlugin) &&
embedder_web_contents_->GetController().CanViewSource();
« 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