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

Issue 7721001: PrintPreview: Make ctrl-shift-p start the native print flow. (Closed)

Created:
9 years, 4 months ago by kmadhusu
Modified:
9 years, 3 months ago
Reviewers:
Lei Zhang, Nico
CC:
chromium-reviews, mazda, arv (Not doing code reviews), derat+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

PrintPreview: Make ctrl-shift-p start the native print flow. + Added PrintPreviewUITest.AdvancedPrintCommandEnabled BUG=93819 TEST=Open a tab. Press ctrl+shift+p to start native print workflow. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=98450

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 10

Patch Set 3 : '' #

Patch Set 4 : Addressed review comments #

Total comments: 7

Patch Set 5 : Addressed review comments. #

Total comments: 8

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 2

Patch Set 8 : Addressed comment #

Patch Set 9 : Rebase + merge conflicts fix #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+118 lines, -5 lines) Patch
M chrome/app/chrome_command_ids.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/app/chrome_dll.rc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/global_keyboard_shortcuts_mac.mm View 1 2 2 chunks +2 lines, -1 line 2 comments Download
M chrome/browser/printing/print_view_manager.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/printing/print_view_manager.cc View 1 2 3 4 5 1 chunk +20 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 8 4 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/ui/gtk/accelerators_gtk.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/accelerator_table_gtk.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_data_source.cc View 1 2 3 4 5 6 7 2 chunks +18 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_handler.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_handler.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_ui.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_ui.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_ui_uitest.cc View 1 chunk +37 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
kmadhusu
thestig: I need to test these changes on win & mac to make sure the ...
9 years, 4 months ago (2011-08-23 23:59:10 UTC) #1
Lei Zhang
http://codereview.chromium.org/7721001/diff/2001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): http://codereview.chromium.org/7721001/diff/2001/chrome/app/generated_resources.grd#newcode6011 chrome/app/generated_resources.grd:6011: (Shift+Ctrl+P) I'm sure you are aware, but this needs ...
9 years, 4 months ago (2011-08-24 01:27:28 UTC) #2
kmadhusu
http://codereview.chromium.org/7721001/diff/2001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): http://codereview.chromium.org/7721001/diff/2001/chrome/app/generated_resources.grd#newcode6011 chrome/app/generated_resources.grd:6011: (Shift+Ctrl+P) On 2011/08/24 01:27:28, Lei Zhang wrote: > I'm ...
9 years, 4 months ago (2011-08-25 02:15:20 UTC) #3
Lei Zhang
It only crashes if you do it wrong. Try this: printing::PrintPreviewTabController* tab_controller = printing::PrintPreviewTabController::GetInstance(); if ...
9 years, 4 months ago (2011-08-25 09:05:49 UTC) #4
kmadhusu
Today morning, I tried something similar to sample code. At times, I noticed that a ...
9 years, 4 months ago (2011-08-25 17:51:48 UTC) #5
Lei Zhang
It sounds like for my idea, I'd have to fix all the subtle issues that ...
9 years, 4 months ago (2011-08-25 20:43:23 UTC) #6
Lei Zhang
http://codereview.chromium.org/7721001/diff/15002/chrome/browser/printing/print_view_manager.cc File chrome/browser/printing/print_view_manager.cc (right): http://codereview.chromium.org/7721001/diff/15002/chrome/browser/printing/print_view_manager.cc#newcode106 chrome/browser/printing/print_view_manager.cc:106: PrintNow(); you want to do: return PrintNow() here because ...
9 years, 4 months ago (2011-08-25 20:57:09 UTC) #7
Lei Zhang
http://codereview.chromium.org/7721001/diff/15002/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): http://codereview.chromium.org/7721001/diff/15002/chrome/browser/ui/browser.cc#newcode4171 chrome/browser/ui/browser.cc:4171: selected_tab_is_preview_tab = On 2011/08/25 20:43:23, Lei Zhang wrote: > ...
9 years, 4 months ago (2011-08-25 21:15:49 UTC) #8
kmadhusu
http://codereview.chromium.org/7721001/diff/15002/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): http://codereview.chromium.org/7721001/diff/15002/chrome/app/generated_resources.grd#newcode6015 chrome/app/generated_resources.grd:6015: <if expr="not is_win and not is_macosx"> On 2011/08/25 20:43:23, ...
9 years, 4 months ago (2011-08-25 22:47:39 UTC) #9
Lei Zhang
LGTM http://codereview.chromium.org/7721001/diff/12019/chrome/browser/ui/webui/print_preview_data_source.cc File chrome/browser/ui/webui/print_preview_data_source.cc (right): http://codereview.chromium.org/7721001/diff/12019/chrome/browser/ui/webui/print_preview_data_source.cc#newcode93 chrome/browser/ui/webui/print_preview_data_source.cc:93: #if defined(OS_MACOSX) Probably don't need this. UTF8ToUTF16 should ...
9 years, 4 months ago (2011-08-25 23:01:47 UTC) #10
kmadhusu
http://codereview.chromium.org/7721001/diff/12019/chrome/browser/ui/webui/print_preview_data_source.cc File chrome/browser/ui/webui/print_preview_data_source.cc (right): http://codereview.chromium.org/7721001/diff/12019/chrome/browser/ui/webui/print_preview_data_source.cc#newcode93 chrome/browser/ui/webui/print_preview_data_source.cc:93: #if defined(OS_MACOSX) On 2011/08/25 23:01:47, Lei Zhang wrote: > ...
9 years, 4 months ago (2011-08-26 02:15:07 UTC) #11
Nico
http://codereview.chromium.org/7721001/diff/19001/chrome/browser/global_keyboard_shortcuts_mac.mm File chrome/browser/global_keyboard_shortcuts_mac.mm (right): http://codereview.chromium.org/7721001/diff/19001/chrome/browser/global_keyboard_shortcuts_mac.mm#newcode84 chrome/browser/global_keyboard_shortcuts_mac.mm:84: {true, true, false, false, 0, 'p', IDC_ADVANCED_PRINT}, The way ...
9 years, 3 months ago (2011-08-29 23:43:48 UTC) #12
kmadhusu
9 years, 3 months ago (2011-08-30 00:27:03 UTC) #13
http://codereview.chromium.org/7721001/diff/19001/chrome/browser/global_keybo...
File chrome/browser/global_keyboard_shortcuts_mac.mm (right):

http://codereview.chromium.org/7721001/diff/19001/chrome/browser/global_keybo...
chrome/browser/global_keyboard_shortcuts_mac.mm:84: {true,  true,  false, false,
0,                'p', IDC_ADVANCED_PRINT},
On 2011/08/29 23:43:48, Nico wrote:
> The way this would normally be done on mac is to edit MainMenu.xib and add a
> second menu item below "Print…" called (say) "System Print" and assign it a
> shortcut in IB (cmd-shift-p is usually "Page Setup…" on mac, so maybe
> cmd-opt-p). You would then set the "Alternate" checkbox. This way, when the
user
> clicks the file menu and hits opt, he'll see the "Print…" menu item change to
> "System Print…", and also when he hits cmd-opt-p, the file menu will flash.
You
> might want to talk to the UI people about the string.
> 
> (You'd put the decimal value belonging to IDC_ADVANCED_PRINT into the new menu
> item's tag, and it should be dispatched correctly automatically, without real
> code changes.)

Thakis: Thanks a lot for the info. I am not a mac user. I wasn't aware of this.
I will make the code changes accordingly.

Powered by Google App Engine
This is Rietveld 408576698