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

Issue 2215123002: Disable Print in the context menu when a modal dialog is shown (Closed)

Created:
4 years, 4 months ago by takumif
Modified:
4 years, 4 months ago
Reviewers:
Lei Zhang
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Disable Print in the context menu when a modal dialog is shown Disable the "Print..." option in the page context menu when chrome::CanPrint is false. This disables printing when a modal dialog, such as the Media Router dialog, is being shown, just like the Print option in the hotdog menu. BUG=590650 Committed: https://crrev.com/10d41a7cb5416afdb434e98c3b411284c0ab0be8 Cr-Commit-Position: refs/heads/master@{#410138}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Address Lei's comments #

Patch Set 3 : Address Lei's comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -3 lines) Patch
M chrome/browser/renderer_context_menu/render_view_context_menu.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/renderer_context_menu/render_view_context_menu.cc View 1 2 2 chunks +12 lines, -3 lines 0 comments Download

Messages

Total messages: 17 (7 generated)
takumif
Please take a look, thank you!
4 years, 4 months ago (2016-08-04 23:41:46 UTC) #4
Lei Zhang
https://codereview.chromium.org/2215123002/diff/1/chrome/browser/renderer_context_menu/render_view_context_menu.cc File chrome/browser/renderer_context_menu/render_view_context_menu.cc (left): https://codereview.chromium.org/2215123002/diff/1/chrome/browser/renderer_context_menu/render_view_context_menu.cc#oldcode1430 chrome/browser/renderer_context_menu/render_view_context_menu.cc:1430: if (id == IDC_PRINT && (content_restrictions & CONTENT_RESTRICTION_PRINT)) Maybe ...
4 years, 4 months ago (2016-08-04 23:54:09 UTC) #5
takumif
Thank you for your fast review! Please take a look again, thanks! https://codereview.chromium.org/2215123002/diff/1/chrome/browser/renderer_context_menu/render_view_context_menu.cc File chrome/browser/renderer_context_menu/render_view_context_menu.cc ...
4 years, 4 months ago (2016-08-05 00:40:09 UTC) #6
Lei Zhang
https://codereview.chromium.org/2215123002/diff/1/chrome/browser/renderer_context_menu/render_view_context_menu.cc File chrome/browser/renderer_context_menu/render_view_context_menu.cc (right): https://codereview.chromium.org/2215123002/diff/1/chrome/browser/renderer_context_menu/render_view_context_menu.cc#newcode2082 chrome/browser/renderer_context_menu/render_view_context_menu.cc:2082: Browser* browser = chrome::FindLastActive(); On 2016/08/05 00:40:08, takumif wrote: ...
4 years, 4 months ago (2016-08-05 01:48:48 UTC) #7
takumif
https://codereview.chromium.org/2215123002/diff/1/chrome/browser/renderer_context_menu/render_view_context_menu.cc File chrome/browser/renderer_context_menu/render_view_context_menu.cc (right): https://codereview.chromium.org/2215123002/diff/1/chrome/browser/renderer_context_menu/render_view_context_menu.cc#newcode2082 chrome/browser/renderer_context_menu/render_view_context_menu.cc:2082: Browser* browser = chrome::FindLastActive(); On 2016/08/05 01:48:47, Lei Zhang ...
4 years, 4 months ago (2016-08-05 18:12:29 UTC) #8
Lei Zhang
lgtm
4 years, 4 months ago (2016-08-05 18:22:00 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2215123002/40001
4 years, 4 months ago (2016-08-05 18:25:58 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 4 months ago (2016-08-05 19:20:08 UTC) #14
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/10d41a7cb5416afdb434e98c3b411284c0ab0be8 Cr-Commit-Position: refs/heads/master@{#410138}
4 years, 4 months ago (2016-08-05 19:23:38 UTC) #16
takumif
4 years, 4 months ago (2016-08-05 19:28:08 UTC) #17
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:40001) has been created in
https://codereview.chromium.org/2214323003/ by takumif@chromium.org.

The reason for reverting is:
chrome::FindBrowserWithWebContents(source_web_contents_) returns a nullptr for
the PDF viewer, causing the Print option to be disabled for PDFs. We need to
replace chrome::FindBrowserWithWebContents(source_web_contents_)..

Powered by Google App Engine
This is Rietveld 408576698