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

Issue 2376193006: Disable Ctrl+Shift+P on Chrome OS (Closed)

Created:
4 years, 2 months ago by skau
Modified:
4 years, 2 months ago
Reviewers:
Lei Zhang
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Disable Ctrl+Shift+P on Chrome OS Chrome OS uses ENABLE_BASIC_PRINTING but has no system dialog. Disable the shortcut as invoking printing in this state causes a crash. BUG=652220 TEST=Verify printing still works. Ctrl+Shift+P is a nop. Committed: https://crrev.com/03b6108c27abe7ebecec0179c34c05938ae3e905 Cr-Commit-Position: refs/heads/master@{#423047}

Patch Set 1 #

Total comments: 4

Patch Set 2 : better macros #

Patch Set 3 : Fix test. #

Total comments: 14

Patch Set 4 : extra comments #

Patch Set 5 : \ #

Patch Set 6 : proofed #

Total comments: 2

Patch Set 7 : rebase #

Patch Set 8 : remove comment #

Patch Set 9 : fix for buildflag #

Total comments: 6

Patch Set 10 : declare what you use #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -16 lines) Patch
M chrome/browser/ui/browser_commands.cc View 1 2 3 4 5 6 7 8 9 4 chunks +9 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_handler.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_handler.cc View 1 2 3 4 5 6 7 8 9 5 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/common/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/features.gni View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M printing/printing_context_chromeos.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 48 (23 generated)
skau
This will disable the system dialog shortcut on Chrome OS. Let me know if there's ...
4 years, 2 months ago (2016-10-03 18:13:29 UTC) #2
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/2376193006/1
4 years, 2 months ago (2016-10-03 18:18:07 UTC) #4
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
4 years, 2 months ago (2016-10-03 18:18:09 UTC) #6
Lei Zhang
https://codereview.chromium.org/2376193006/diff/1/chrome/browser/ui/browser_command_controller.cc File chrome/browser/ui/browser_command_controller.cc (right): https://codereview.chromium.org/2376193006/diff/1/chrome/browser/ui/browser_command_controller.cc#newcode1105 chrome/browser/ui/browser_command_controller.cc:1105: command_updater_.UpdateCommandEnabled(IDC_BASIC_PRINT, false); Why not just make CanBasicPrint() return false? ...
4 years, 2 months ago (2016-10-03 18:33:03 UTC) #10
skau
Thanks for the review. I've made some simplifications. https://codereview.chromium.org/2376193006/diff/1/chrome/browser/ui/browser_command_controller.cc File chrome/browser/ui/browser_command_controller.cc (right): https://codereview.chromium.org/2376193006/diff/1/chrome/browser/ui/browser_command_controller.cc#newcode1105 chrome/browser/ui/browser_command_controller.cc:1105: command_updater_.UpdateCommandEnabled(IDC_BASIC_PRINT, ...
4 years, 2 months ago (2016-10-03 21:52:05 UTC) #14
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/2376193006/40001
4 years, 2 months ago (2016-10-03 21:52:12 UTC) #15
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
4 years, 2 months ago (2016-10-03 21:52:17 UTC) #17
Lei Zhang
On 2016/10/03 21:52:17, commit-bot: I haz the power wrote: > No L-G-T-M from a valid ...
4 years, 2 months ago (2016-10-03 22:03:46 UTC) #18
Lei Zhang
looks ok, though I'm not thrilled about it because now "enable basic printing" has platform-specific ...
4 years, 2 months ago (2016-10-03 23:03:58 UTC) #21
skau
On 2016/10/03 22:03:46, Lei Zhang wrote: > On 2016/10/03 21:52:17, commit-bot: I haz the power ...
4 years, 2 months ago (2016-10-03 23:30:22 UTC) #22
Lei Zhang
On 2016/10/03 23:03:58, Lei Zhang wrote: > looks ok, though I'm not thrilled about it ...
4 years, 2 months ago (2016-10-03 23:31:06 UTC) #23
skau
I'm not crazy about the condition I'm introducing for basic printing but we would need ...
4 years, 2 months ago (2016-10-03 23:32:13 UTC) #24
skau
On 2016/10/03 23:31:06, Lei Zhang wrote: > On 2016/10/03 23:03:58, Lei Zhang wrote: > > ...
4 years, 2 months ago (2016-10-03 23:51:57 UTC) #25
skau
I've added a new feature, enable_basic_print_dialog. PTAL.
4 years, 2 months ago (2016-10-04 00:19:57 UTC) #26
Lei Zhang
ENABLE_BASIC_PRINT_DIALOG isn't actually defined. https://codereview.chromium.org/2376193006/diff/100001/chrome/browser/ui/webui/print_preview/print_preview_handler.cc File chrome/browser/ui/webui/print_preview/print_preview_handler.cc (right): https://codereview.chromium.org/2376193006/diff/100001/chrome/browser/ui/webui/print_preview/print_preview_handler.cc#newcode1167 chrome/browser/ui/webui/print_preview/print_preview_handler.cc:1167: #endif // defined(ENABLE_BASIC_PRINT_DIALOG) omit comment?
4 years, 2 months ago (2016-10-04 00:22:38 UTC) #29
skau
On 2016/10/04 00:22:38, Lei Zhang wrote: > ENABLE_BASIC_PRINT_DIALOG isn't actually defined. > > https://codereview.chromium.org/2376193006/diff/100001/chrome/browser/ui/webui/print_preview/print_preview_handler.cc > ...
4 years, 2 months ago (2016-10-04 18:09:31 UTC) #32
skau
https://codereview.chromium.org/2376193006/diff/100001/chrome/browser/ui/webui/print_preview/print_preview_handler.cc File chrome/browser/ui/webui/print_preview/print_preview_handler.cc (right): https://codereview.chromium.org/2376193006/diff/100001/chrome/browser/ui/webui/print_preview/print_preview_handler.cc#newcode1167 chrome/browser/ui/webui/print_preview/print_preview_handler.cc:1167: #endif // defined(ENABLE_BASIC_PRINT_DIALOG) On 2016/10/04 00:22:38, Lei Zhang wrote: ...
4 years, 2 months ago (2016-10-04 18:09:49 UTC) #33
Lei Zhang
On 2016/10/04 18:09:31, skau wrote: > On 2016/10/04 00:22:38, Lei Zhang wrote: > > defined(ENABLE_BASIC_PRINT_DIALOG) ...
4 years, 2 months ago (2016-10-04 18:26:36 UTC) #34
skau
I fixed it to use BUILDFLAG and fixed the test to catch the previous problem. ...
4 years, 2 months ago (2016-10-04 22:03:11 UTC) #35
Lei Zhang
https://codereview.chromium.org/2376193006/diff/160001/chrome/browser/BUILD.gn File chrome/browser/BUILD.gn (right): https://codereview.chromium.org/2376193006/diff/160001/chrome/browser/BUILD.gn#newcode2431 chrome/browser/BUILD.gn:2431: just a blank line change? https://codereview.chromium.org/2376193006/diff/160001/chrome/browser/ui/browser_commands.cc File chrome/browser/ui/browser_commands.cc (right): ...
4 years, 2 months ago (2016-10-04 22:10:55 UTC) #38
skau
PTAL https://codereview.chromium.org/2376193006/diff/160001/chrome/browser/BUILD.gn File chrome/browser/BUILD.gn (right): https://codereview.chromium.org/2376193006/diff/160001/chrome/browser/BUILD.gn#newcode2431 chrome/browser/BUILD.gn:2431: On 2016/10/04 22:10:54, Lei Zhang wrote: > just ...
4 years, 2 months ago (2016-10-05 00:18:01 UTC) #41
Lei Zhang
lgtm
4 years, 2 months ago (2016-10-05 00:23:17 UTC) #42
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/2376193006/180001
4 years, 2 months ago (2016-10-05 00:44:51 UTC) #44
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 2 months ago (2016-10-05 01:52:50 UTC) #46
commit-bot: I haz the power
4 years, 2 months ago (2016-10-05 01:54:12 UTC) #48
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/03b6108c27abe7ebecec0179c34c05938ae3e905
Cr-Commit-Position: refs/heads/master@{#423047}

Powered by Google App Engine
This is Rietveld 408576698