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

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

Issue 628403003: In pdf context menu 'Print..' is coming 2 times. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit correction. Created 6 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 b0aa4fec544f8762a7ad9d77c1eae872f6f2fbb8..5574ba030d2f9ec91b3ebc43bcfd7fc0e6a52392 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -825,6 +825,11 @@ void RenderViewContextMenu::AppendCopyItem() {
}
void RenderViewContextMenu::AppendPrintItem() {
+ // AppendPluginItems() could have already added |IDC_PRINT| so we are
+ // skipping it here if |IDC_PRINT| is already present in the context menu.
+ if (menu_model_.GetIndexOfCommandId(IDC_PRINT) != -1)
+ return;
+
if (GetPrefs(browser_context_)->GetBoolean(prefs::kPrintingEnabled) &&
(params_.media_type == WebContextMenuData::MediaTypeNone ||
params_.media_flags & WebContextMenuData::MediaCanPrint)) {
« 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