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

Issue 2477283002: Convert printing IPCs to Mojo

Created:
4 years, 1 month ago by tibell
Modified:
3 years, 10 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, darin (slow to review), rbpotter, skau
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Convert printing IPCs to Mojo BUG=577685

Patch Set 1 #

Patch Set 2 : Don't conditionally define param traits #

Patch Set 3 : Move components/printing/public to components/printing/common #

Patch Set 4 : Remove unused Send function #

Patch Set 5 : Update Windows-only code #

Patch Set 6 : Fix Windows compile errors #

Patch Set 7 : Add missing namespace prefix #

Patch Set 8 : Merge #

Patch Set 9 : common_custom_types.mojom moved #

Patch Set 10 : Left-over merge #

Patch Set 11 : Add global font pre cacher needed for pdf callback #

Patch Set 12 : Add missing win-only dep #

Patch Set 13 : Add more win-only deps #

Patch Set 14 : git cl format #

Total comments: 10

Patch Set 15 : Address sammc's review comments #

Patch Set 16 : Change callback arg #

Patch Set 17 : Keep PdfToEmfUtilityProcessHostClient ref-counted #

Patch Set 18 : Fix windows compile error #

Total comments: 13

Patch Set 19 : Address groby's review comments #

Patch Set 20 : Add TODO for conditionally-defined messages #

Patch Set 21 : Merge #

Patch Set 22 : Follow mojo::GetProxy rename #

Total comments: 27

Patch Set 23 : Address sammc's review comments #

Total comments: 6

Patch Set 24 : Fix Windows compilation errors #

Patch Set 25 : Address review comments #

Patch Set 26 : Fix more Windows compile errors #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+668 lines, -558 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/printing/pdf_to_emf_converter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 chunks +108 lines, -146 lines 0 comments Download
M chrome/browser/printing/pwg_raster_converter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 7 chunks +25 lines, -37 lines 0 comments Download
M chrome/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/chrome_utility_printing_messages.h View 1 1 chunk +0 lines, -170 lines 0 comments Download
M chrome/common/common_message_generator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/service/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/service/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/service/service_utility_process_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +11 lines, -9 lines 0 comments Download
M chrome/service/service_utility_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 11 chunks +78 lines, -85 lines 2 comments Download
M chrome/utility/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/utility/DEPS View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/utility/chrome_content_utility_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/utility/printing_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +41 lines, -23 lines 0 comments Download
M chrome/utility/printing_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 5 chunks +88 lines, -68 lines 0 comments Download
M components/printing/common/BUILD.gn View 1 2 3 4 5 2 chunks +14 lines, -0 lines 0 comments Download
M components/printing/common/OWNERS View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M components/printing/common/print_messages.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
A components/printing/common/printing.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +85 lines, -0 lines 0 comments Download
A components/printing/common/printing.typemap View 1 2 1 chunk +26 lines, -0 lines 0 comments Download
A components/printing/common/printing_param_traits.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +10 lines, -0 lines 0 comments Download
A components/printing/common/printing_param_traits.cc View 1 2 1 chunk +45 lines, -0 lines 0 comments Download
M components/printing/common/printing_param_traits_macros.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +55 lines, -6 lines 0 comments Download
A components/printing/common/printing_win.typemap View 1 2 3 4 5 6 7 1 chunk +11 lines, -0 lines 0 comments Download
A components/printing/common/typemaps.gni View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
A components/printing/common/typemaps_win.gni View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/chromium_bindings_configuration.gni View 1 2 3 4 5 6 7 4 chunks +20 lines, -2 lines 0 comments Download
M mojo/public/tools/bindings/mojom.gni View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +12 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/mojom_bindings_generator.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download
M printing/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +5 lines, -0 lines 0 comments Download
M printing/pdf_render_settings.h View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 174 (120 generated)
tibell
Don't conditionally define param traits
4 years, 1 month ago (2016-11-08 02:25:19 UTC) #5
tibell
Move components/printing/public to components/printing/common
4 years, 1 month ago (2016-11-08 03:05:12 UTC) #10
tibell
Remove unused Send function
4 years, 1 month ago (2016-11-08 03:31:08 UTC) #15
tibell
Update Windows-only code
4 years, 1 month ago (2016-11-09 03:36:05 UTC) #20
tibell
Fix Windows compile errors
4 years, 1 month ago (2016-11-09 05:52:56 UTC) #25
tibell
Add missing namespace prefix
4 years, 1 month ago (2016-11-09 22:40:05 UTC) #30
tibell
Merge
4 years ago (2016-12-11 23:58:13 UTC) #43
tibell
common_custom_types.mojom moved
4 years ago (2016-12-12 00:12:36 UTC) #48
tibell
Left-over merge
4 years ago (2016-12-12 00:18:58 UTC) #51
tibell
Add global font pre cacher needed for pdf callback
4 years ago (2016-12-12 00:35:18 UTC) #54
tibell
Add missing win-only dep
4 years ago (2016-12-12 02:13:34 UTC) #59
tibell
Add more win-only deps
4 years ago (2016-12-12 02:31:40 UTC) #62
tibell
git cl format
4 years ago (2016-12-12 04:37:01 UTC) #67
tibell
This moves printing IPCs to Mojo (we're converting all old IPCs to Mojo). Sam, please ...
4 years ago (2016-12-12 04:47:20 UTC) #71
tibell
4 years ago (2016-12-12 05:38:22 UTC) #76
Sam McNally
https://codereview.chromium.org/2477283002/diff/260001/chrome/browser/printing/pdf_to_emf_converter.cc File chrome/browser/printing/pdf_to_emf_converter.cc (right): https://codereview.chromium.org/2477283002/diff/260001/chrome/browser/printing/pdf_to_emf_converter.cc#newcode107 chrome/browser/printing/pdf_to_emf_converter.cc:107: class PdfToEmfUtilityProcessHostClient Consider using UtilityProcessMojoClient to abstract utility process ...
4 years ago (2016-12-12 06:09:20 UTC) #77
tibell
Address sammc's review comments
4 years ago (2016-12-13 23:37:46 UTC) #78
tibell
PTAL https://codereview.chromium.org/2477283002/diff/260001/chrome/browser/printing/pdf_to_emf_converter.cc File chrome/browser/printing/pdf_to_emf_converter.cc (right): https://codereview.chromium.org/2477283002/diff/260001/chrome/browser/printing/pdf_to_emf_converter.cc#newcode107 chrome/browser/printing/pdf_to_emf_converter.cc:107: class PdfToEmfUtilityProcessHostClient On 2016/12/12 06:09:20, Sam McNally wrote: ...
4 years ago (2016-12-13 23:41:55 UTC) #81
tibell
Change callback arg
4 years ago (2016-12-14 00:35:35 UTC) #84
tibell
Keep PdfToEmfUtilityProcessHostClient ref-counted
4 years ago (2016-12-14 02:45:31 UTC) #89
tibell
Fix windows compile error
4 years ago (2016-12-14 04:43:14 UTC) #94
groby-ooo-7-16
Thank you for tackling this! Added a few quick drive-by comments. https://codereview.chromium.org/2477283002/diff/340001/chrome/service/service_utility_process_host.cc File chrome/service/service_utility_process_host.cc (right): ...
4 years ago (2016-12-14 17:28:29 UTC) #100
groby-ooo-7-16
Thank you for tackling this! Added a few quick drive-by comments.
4 years ago (2016-12-14 17:28:31 UTC) #102
tibell
Address groby's review comments
4 years ago (2016-12-14 23:11:39 UTC) #104
tibell
PTAL https://codereview.chromium.org/2477283002/diff/340001/chrome/service/service_utility_process_host.cc File chrome/service/service_utility_process_host.cc (right): https://codereview.chromium.org/2477283002/diff/340001/chrome/service/service_utility_process_host.cc#newcode319 chrome/service/service_utility_process_host.cc:319: On 2016/12/14 17:28:29, groby wrote: > Does this ...
4 years ago (2016-12-14 23:12:19 UTC) #107
tibell
Add TODO for conditionally-defined messages
4 years ago (2016-12-21 03:50:48 UTC) #112
tibell
On 2016/12/14 23:12:19, tibell wrote: > PTAL > > https://codereview.chromium.org/2477283002/diff/340001/chrome/service/service_utility_process_host.cc > File chrome/service/service_utility_process_host.cc (right): > ...
4 years ago (2016-12-21 03:51:03 UTC) #114
tibell
https://codereview.chromium.org/2477283002/diff/340001/chrome/utility/printing_handler.cc File chrome/utility/printing_handler.cc (right): https://codereview.chromium.org/2477283002/diff/340001/chrome/utility/printing_handler.cc#newcode88 chrome/utility/printing_handler.cc:88: void PrintingHandler::RenderPDFPagesToMetafiles( On 2016/12/14 23:12:19, tibell wrote: > On ...
4 years ago (2016-12-21 03:52:31 UTC) #117
tibell
Merge
4 years ago (2016-12-21 03:56:11 UTC) #118
tibell
Follow mojo::GetProxy rename
4 years ago (2016-12-21 06:10:59 UTC) #123
tibell
Friendly ping to all reviewers. I still need your reviews. :)
3 years, 11 months ago (2017-01-03 00:16:55 UTC) #128
Sam McNally
https://codereview.chromium.org/2477283002/diff/410001/chrome/browser/printing/pdf_to_emf_converter.cc File chrome/browser/printing/pdf_to_emf_converter.cc (right): https://codereview.chromium.org/2477283002/diff/410001/chrome/browser/printing/pdf_to_emf_converter.cc#newcode321 chrome/browser/printing/pdf_to_emf_converter.cc:321: utility_client_.reset( Prefer base::MakeUnique over std::unique_ptr::reset(). https://codereview.chromium.org/2477283002/diff/410001/chrome/browser/printing/pdf_to_emf_converter.cc#newcode351 chrome/browser/printing/pdf_to_emf_converter.cc:351: start_callback_.Run(page_count); base::ResetAndReturn(&start_callback_).Run(page_count); ...
3 years, 11 months ago (2017-01-05 06:23:15 UTC) #129
tibell
Address sammc's review comments
3 years, 11 months ago (2017-01-12 03:28:37 UTC) #130
tibell
PTAL https://codereview.chromium.org/2477283002/diff/410001/chrome/browser/printing/pdf_to_emf_converter.cc File chrome/browser/printing/pdf_to_emf_converter.cc (right): https://codereview.chromium.org/2477283002/diff/410001/chrome/browser/printing/pdf_to_emf_converter.cc#newcode321 chrome/browser/printing/pdf_to_emf_converter.cc:321: utility_client_.reset( On 2017/01/05 06:23:15, Sam McNally wrote: > ...
3 years, 11 months ago (2017-01-12 03:30:15 UTC) #133
Sam McNally
lgtm https://codereview.chromium.org/2477283002/diff/410001/chrome/service/service_utility_process_host.h File chrome/service/service_utility_process_host.h (right): https://codereview.chromium.org/2477283002/diff/410001/chrome/service/service_utility_process_host.h#newcode157 chrome/service/service_utility_process_host.h:157: printing::mojom::PrintingPtr printing_; On 2017/01/12 03:30:15, tibell wrote: > ...
3 years, 11 months ago (2017-01-12 04:49:53 UTC) #136
Vitaly Buka (NO REVIEWS)
https://codereview.chromium.org/2477283002/diff/430001/chrome/browser/printing/pwg_raster_converter.cc File chrome/browser/printing/pwg_raster_converter.cc (right): https://codereview.chromium.org/2477283002/diff/430001/chrome/browser/printing/pwg_raster_converter.cc#newcode66 chrome/browser/printing/pwg_raster_converter.cc:66: return pdf_file_.Duplicate(); does this guarantee that files will be ...
3 years, 11 months ago (2017-01-12 19:57:59 UTC) #141
Vitaly Buka (NO REVIEWS)
Can you please make win bots green? I'll try to apply and run the patch.
3 years, 11 months ago (2017-01-12 19:59:36 UTC) #144
tibell
Fix Windows compilation errors
3 years, 11 months ago (2017-01-12 23:39:03 UTC) #147
tibell
Address review comments
3 years, 11 months ago (2017-01-13 00:22:45 UTC) #150
tibell
https://codereview.chromium.org/2477283002/diff/430001/chrome/browser/printing/pdf_to_emf_converter.cc File chrome/browser/printing/pdf_to_emf_converter.cc (right): https://codereview.chromium.org/2477283002/diff/430001/chrome/browser/printing/pdf_to_emf_converter.cc#newcode299 chrome/browser/printing/pdf_to_emf_converter.cc:299: class FontPreCachingImpl : public mojom::FontPreCaching { On 2017/01/12 04:49:53, ...
3 years, 11 months ago (2017-01-13 02:51:10 UTC) #155
tibell
Fix more Windows compile errors
3 years, 11 months ago (2017-01-13 03:18:56 UTC) #156
groby-ooo-7-16
Adding rbpotter@ as an FYI (feel free to chime in, though!)
3 years, 11 months ago (2017-01-17 18:25:14 UTC) #161
leonhsl(Using Gerrit)
https://codereview.chromium.org/2477283002/diff/490001/chrome/service/service_utility_process_host.cc File chrome/service/service_utility_process_host.cc (right): https://codereview.chromium.org/2477283002/diff/490001/chrome/service/service_utility_process_host.cc#newcode451 chrome/service/service_utility_process_host.cc:451: child_process_host_->GetRemoteInterfaces()->GetInterface(&printing_factory); Hi, I came across here while checking some ...
3 years, 11 months ago (2017-01-18 03:35:29 UTC) #163
leonhsl(Using Gerrit)
https://codereview.chromium.org/2477283002/diff/490001/chrome/service/service_utility_process_host.cc File chrome/service/service_utility_process_host.cc (right): https://codereview.chromium.org/2477283002/diff/490001/chrome/service/service_utility_process_host.cc#newcode451 chrome/service/service_utility_process_host.cc:451: child_process_host_->GetRemoteInterfaces()->GetInterface(&printing_factory); On 2017/01/18 03:35:29, leonhsl wrote: > Hi, I ...
3 years, 11 months ago (2017-01-18 03:38:11 UTC) #164
Vitaly Buka (NO REVIEWS)
I patched this my checkout with this patch and can't print. E.g. printing to Microsoft ...
3 years, 11 months ago (2017-01-19 03:18:22 UTC) #165
tibell
On 2017/01/19 03:18:22, Vitaly Buka wrote: > I patched this my checkout with this patch ...
3 years, 11 months ago (2017-01-19 03:43:27 UTC) #166
skau
Microsoft XPS means it's on Windows. No printer required. It's like printing to PDF On ...
3 years, 11 months ago (2017-01-19 03:48:27 UTC) #167
Vitaly Buka (NO REVIEWS)
On 2017/01/19 03:48:27, skau wrote: > Microsoft XPS means it's on Windows. No printer required. ...
3 years, 11 months ago (2017-01-19 04:01:23 UTC) #168
groby-ooo-7-16
On 2017/01/19 04:01:23, Vitaly Buka wrote: > On 2017/01/19 03:48:27, skau wrote: > > Microsoft ...
3 years, 10 months ago (2017-02-15 01:39:30 UTC) #169
dcheng
On 2017/02/15 01:39:30, groby wrote: > On 2017/01/19 04:01:23, Vitaly Buka wrote: > > On ...
3 years, 10 months ago (2017-02-15 22:05:20 UTC) #170
tibell
On 2017/02/15 01:39:30, groby wrote: > On 2017/01/19 04:01:23, Vitaly Buka wrote: > > On ...
3 years, 10 months ago (2017-02-15 23:21:52 UTC) #171
tibell
On 2017/02/15 22:05:20, dcheng wrote: > On 2017/02/15 01:39:30, groby wrote: > > On 2017/01/19 ...
3 years, 10 months ago (2017-02-15 23:22:50 UTC) #172
chromium-reviews
FYI, blundell@ expressed interest in helping with some bindings work. Besides, he actively participated in ...
3 years, 10 months ago (2017-02-15 23:25:51 UTC) #173
groby-ooo-7-16
3 years, 10 months ago (2017-02-16 00:49:38 UTC) #174
On 2017/02/15 23:22:50, tibell wrote:
> On 2017/02/15 22:05:20, dcheng wrote:
> > On 2017/02/15 01:39:30, groby wrote:
> > > On 2017/01/19 04:01:23, Vitaly Buka wrote:
> > > > On 2017/01/19 03:48:27, skau wrote:
> > > > > Microsoft XPS means it's on Windows. No printer required. It's like
> > > > > printing to PDF
> > > > > 
> > > > 
> > > > Correct.
> > > > 1. Run chrome.
> > > > 2. ctrl+p
> > > > 3. select "Microsoft XPS..."
> > > > 4. print
> > > > 5. now it should ask for output file
> > > > 
> > > > with patch: no file created
> > > > without patch: file is created
> > > > 
> > > > Similar way cloud print needs to be verified:
> > > > 1. Run chrome.
> > > > 2. goto chrome:devices
> > > > 3. Share Microsoft XPS printer
> > > > 4. ctrl+p
> > > > 5. Now select Cloud Printer -> "Microsoft XPS..."
> > > > 6. print
> > > > 7. now it should ask for output file
> > > 
> > > So, is this stalled out?
> > 
> > On my side, I'm waiting for conditional compilation in mojoms (which I think
> the
> > Mojo team plans to implement, but I'm not sure what the status is)
> 
> AFAIK no one is working or planning to work on this at the moment. We plan to
go
> with the existing approach (i.e. what I did in this CL) until someone
implements
> conditional compilation.

That means I can stop feeling guilty about having this in my review list :)

Powered by Google App Engine
This is Rietveld 408576698