|
|
Created:
6 years, 2 months ago by Vitaly Buka (NO REVIEWS) Modified:
6 years, 2 months ago CC:
chromium-reviews, mkwst+moarreviews-renderer_chromium.org, darin-cc_chromium.org, jam Base URL:
https://chromium.googlesource.com/chromium/src.git@master Project:
chromium Visibility:
Public. |
DescriptionPdfToMetafile messages always required on Windows.
Restore Pepper printing support even without full printing.
If was guarded to work in full printing for Android, because Android
did not implemented that functionality. Proper guard should allow
even non-full printing, because code is usefull to print PDF.
Removed printing to DC code, related code already deleted from Chrome.
BUG=170859, 417967
Committed: https://crrev.com/3967c43228c59144237d1e92a30994ca1c640750
Cr-Commit-Position: refs/heads/master@{#297324}
Patch Set 1 #Patch Set 2 : Thu Sep 25 14:54:53 PDT 2014 #Patch Set 3 : Thu Sep 25 14:57:11 PDT 2014 #Patch Set 4 : Thu Sep 25 15:03:35 PDT 2014 #Patch Set 5 : Thu Sep 25 15:16:23 PDT 2014 #Patch Set 6 : Thu Sep 25 15:18:38 PDT 2014 #Patch Set 7 : Thu Sep 25 15:49:59 PDT 2014 #Patch Set 8 : Thu Sep 25 15:59:55 PDT 2014 #Patch Set 9 : Thu Sep 25 16:05:54 PDT 2014 #Patch Set 10 : Thu Sep 25 16:10:03 PDT 2014 #
Total comments: 2
Patch Set 11 : Thu Sep 25 21:03:04 PDT 2014 #Patch Set 12 : Thu Sep 25 21:26:54 PDT 2014 #
Total comments: 8
Patch Set 13 : Thu Sep 25 22:06:32 PDT 2014 #Patch Set 14 : Thu Sep 25 22:28:15 PDT 2014 #
Total comments: 2
Messages
Total messages: 32 (5 generated)
vitalybuka@chromium.org changed reviewers: + tsepez@chromium.org, yzshen@chromium.org
vitalybuka@chromium.org changed reviewers: + marshall@chromium.org
Messages LGTM. Just a few typos in the description of this CL: s/PdfToMetifile/PdfToMetafile/ s/peeper/pepper/
Hi, It would be great if you redirect this CL to another Pepper OWNER. I haven't worked on Pepper for a while and I am not very familiar with this feature. Thanks!
vitalybuka@chromium.org changed reviewers: + raymes@chromium.org - yzshen@chromium.org
This change overall looks good (mostly removing code) but I don't really understand the implications. Is there someone who is in a better place to review? I'm happy to give OWNERS rubberstamp. Also, is there a bug for this? What exactly is it fixing (i.e. why are the print messages always needed on windows even when the #define isn't specified for printing)? Also, does this mean that all printing happens outside of the renderer process now?
https://codereview.chromium.org/599633007/diff/180001/content/renderer/pepper... File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/599633007/diff/180001/content/renderer/pepper... content/renderer/pepper/pepper_plugin_instance_impl.cc:1930: nit: blank line
On 2014/09/26 03:06:32, raymes wrote: > This change overall looks good (mostly removing code) but I don't really > understand the implications. Is there someone who is in a better place to > review? I'm happy to give OWNERS rubberstamp. > > Also, is there a bug for this? What exactly is it fixing (i.e. why are the print > messages always needed on windows even when the #define isn't specified for > printing)? Even without full printing windows need to convert PDF to metafiles using those messages. Added related comments. > > Also, does this mean that all printing happens outside of the renderer process > now? Yes. Now it's in utility process. issue 170859.
https://codereview.chromium.org/599633007/diff/180001/content/renderer/pepper... File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/599633007/diff/180001/content/renderer/pepper... content/renderer/pepper/pepper_plugin_instance_impl.cc:1930: On 2014/09/26 03:06:54, raymes wrote: > nit: blank line Done.
vitalybuka@chromium.org changed reviewers: + thestig@chromium.org
https://codereview.chromium.org/599633007/diff/220001/content/renderer/pepper... File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/599633007/diff/220001/content/renderer/pepper... content/renderer/pepper/pepper_plugin_instance_impl.cc:1748: #if defined(ENABLE_PRINTING) && !defined(OS_ANDROID) pepper_plugin_instance_impl.cc isn't even compiled by default on Android.
https://codereview.chromium.org/599633007/diff/220001/chrome/common/chrome_ut... File chrome/common/chrome_utility_printing_messages.h (right): https://codereview.chromium.org/599633007/diff/220001/chrome/common/chrome_ut... chrome/common/chrome_utility_printing_messages.h:89: #if defined(ENABLE_PRINTING) && defined(OS_WIN) Should this be #if defined(ENABLE_PRINTING) && !defined(OS_ANDROID) like in the other file? https://codereview.chromium.org/599633007/diff/220001/content/renderer/pepper... File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/599633007/diff/220001/content/renderer/pepper... content/renderer/pepper/pepper_plugin_instance_impl.cc:1750: // CEF (crbug.com/417967) and Android. nit: might as well duplicate the comment below exactly. https://codereview.chromium.org/599633007/diff/220001/content/renderer/pepper... content/renderer/pepper/pepper_plugin_instance_impl.cc:1936: // CEF (crbug.com/417967) and Android. Android does not call this code. nit: Could you elaborate on why CEF needs to use this?
https://codereview.chromium.org/599633007/diff/220001/chrome/common/chrome_ut... File chrome/common/chrome_utility_printing_messages.h (right): https://codereview.chromium.org/599633007/diff/220001/chrome/common/chrome_ut... chrome/common/chrome_utility_printing_messages.h:89: #if defined(ENABLE_PRINTING) && defined(OS_WIN) this messages windows only. it's for generation of Windows metafiles. All other platforms consume PDFs. On 2014/09/26 04:47:29, raymes wrote: > Should this be #if defined(ENABLE_PRINTING) && !defined(OS_ANDROID) > like in the other file? https://codereview.chromium.org/599633007/diff/220001/content/renderer/pepper... File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/599633007/diff/220001/content/renderer/pepper... content/renderer/pepper/pepper_plugin_instance_impl.cc:1748: #if defined(ENABLE_PRINTING) && !defined(OS_ANDROID) On 2014/09/26 04:46:09, Lei Zhang (OOO starting 09-27) wrote: > pepper_plugin_instance_impl.cc isn't even compiled by default on Android. Oh, I didn't check then. ENABLE_PRINTING was switch to ENABLE_FULL_PRINTING for android https://codereview.chromium.org/22577010/diff/79001/content/renderer/pepper/p... and then android reference was added at https://chromiumcodereview.appspot.com/16206002/diff/64001/content/renderer/p... so now it's safe to revert back. https://codereview.chromium.org/599633007/diff/220001/content/renderer/pepper... content/renderer/pepper/pepper_plugin_instance_impl.cc:1750: // CEF (crbug.com/417967) and Android. On 2014/09/26 04:47:29, raymes wrote: > nit: might as well duplicate the comment below exactly. Done. https://codereview.chromium.org/599633007/diff/220001/content/renderer/pepper... content/renderer/pepper/pepper_plugin_instance_impl.cc:1936: // CEF (crbug.com/417967) and Android. Android does not call this code. On 2014/09/26 04:47:29, raymes wrote: > nit: Could you elaborate on why CEF needs to use this? After Lei's notice about Android we don't need any excuse here. It was originally correct, any platform with printing and PepperPluginInstanceImpl needs this. Also it's a good question why CEF needed this. Primary reason is that they can't support print preview because support of out-of-process pdf is too complicated. However as I understand viewing and printing of PDFs would not be available anyway. So I guess changes in this file would not help them.
On 2014/09/26 05:29:03, Vitaly Buka wrote: > Also it's a good question why CEF needed this. > Primary reason is that they can't support print preview because support of > out-of-process pdf is too complicated. > However as I understand viewing and printing of PDFs would not be available > anyway. > > So I guess changes in this file would not help them. Maybe ask Marshall and see if they have PPAPI support in general?
On 2014/09/26 05:38:17, Lei Zhang (OOO starting 09-27) wrote: > On 2014/09/26 05:29:03, Vitaly Buka wrote: > > Also it's a good question why CEF needed this. > > Primary reason is that they can't support print preview because support of > > out-of-process pdf is too complicated. > > However as I understand viewing and printing of PDFs would not be available > > anyway. > > > > So I guess changes in this file would not help them. > > Maybe ask Marshall and see if they have PPAPI support in general? CEF supports: (1) in-process loading of the pepper pdf plugin for pdf viewing, and (2) basic printing which, on Windows, loads the pepper pdf plugin in a utility process. CEF doesn't support full printing (print preview) due to dependencies on the chrome extension system (chrome uses an extension to load the print preview UI which then uses an out-of-process pdf plugin). We differentiate between no printing, basic printing and full printing support in Chromium based on the `enable_printing` gyp variable. CEF uses "`enable_printing': 2" which sets ENABLE_PRINTING=1 and does not define ENABLE_FULL_PRINTING or DISABLE_BASIC_PRINTING. The PepperPluginInstanceImpl::PrintPage code path is exercised in CEF when pressing the print button on the floating pdf viewer toolbar.
On 2014/09/26 15:18:34, Marshall wrote: > On 2014/09/26 05:38:17, Lei Zhang (OOO starting 09-27) wrote: > > On 2014/09/26 05:29:03, Vitaly Buka wrote: > > > Also it's a good question why CEF needed this. > > > Primary reason is that they can't support print preview because support of > > > out-of-process pdf is too complicated. > > > However as I understand viewing and printing of PDFs would not be available > > > anyway. > > > > > > So I guess changes in this file would not help them. > > > > Maybe ask Marshall and see if they have PPAPI support in general? > > CEF supports: > (1) in-process loading of the pepper pdf plugin for pdf viewing, and Which will eventually go away in favor of out-of-process PPAPI, FYI. > CEF doesn't support full printing (print preview) due to dependencies on the > chrome extension system (chrome uses an extension to load the print preview UI > which then uses an out-of-process pdf plugin). We differentiate between no > printing, basic printing and full printing support in Chromium based on the > `enable_printing` gyp variable. CEF uses "`enable_printing': 2" which sets > ENABLE_PRINTING=1 and does not define ENABLE_FULL_PRINTING or > DISABLE_BASIC_PRINTING. But print preview doesn't use extensions. It's still using in-process PPAPI. One would have to pass --out-of-process-pdf to get OOP PDF.
On 2014/09/26 16:11:53, Lei Zhang (OOO starting 09-27) wrote: > On 2014/09/26 15:18:34, Marshall wrote: > > On 2014/09/26 05:38:17, Lei Zhang (OOO starting 09-27) wrote: > > > On 2014/09/26 05:29:03, Vitaly Buka wrote: > > > > Also it's a good question why CEF needed this. > > > > Primary reason is that they can't support print preview because support of > > > > out-of-process pdf is too complicated. > > > > However as I understand viewing and printing of PDFs would not be > available > > > > anyway. > > > > > > > > So I guess changes in this file would not help them. > > > > > > Maybe ask Marshall and see if they have PPAPI support in general? > > > > CEF supports: > > (1) in-process loading of the pepper pdf plugin for pdf viewing, and > > Which will eventually go away in favor of out-of-process PPAPI, FYI. > > > CEF doesn't support full printing (print preview) due to dependencies on the > > chrome extension system (chrome uses an extension to load the print preview UI > > which then uses an out-of-process pdf plugin). We differentiate between no > > printing, basic printing and full printing support in Chromium based on the > > `enable_printing` gyp variable. CEF uses "`enable_printing': 2" which sets > > ENABLE_PRINTING=1 and does not define ENABLE_FULL_PRINTING or > > DISABLE_BASIC_PRINTING. > > But print preview doesn't use extensions. It's still using in-process PPAPI. One > would have to pass --out-of-process-pdf to get OOP PDF. Ah, my mistake. I was misremembering the conversation from https://groups.google.com/a/chromium.org/d/msg/chromium-dev/hLBbJe_NEGw/iZFG8.... The in-process pdf print preview appears to have a dependency on WebUI (chrome/browser/ui/webui/print_preview) which, like the extension system, would be difficult to utilize outside of the Google Chrome browser.
On 2014/09/26 15:18:34, Marshall wrote: > (2) basic printing which, on Windows, loads the pepper pdf plugin in a utility > process. Given this, I think we can remove the PDF code here, since no one is using this path anymore.
lgtm, but I'm not an owner.
On 2014/09/26 16:37:56, Marshall wrote: > On 2014/09/26 16:11:53, Lei Zhang (OOO starting 09-27) wrote: > > On 2014/09/26 15:18:34, Marshall wrote: > > > On 2014/09/26 05:38:17, Lei Zhang (OOO starting 09-27) wrote: > > > > On 2014/09/26 05:29:03, Vitaly Buka wrote: > > > > > Also it's a good question why CEF needed this. > > > > > Primary reason is that they can't support print preview because support > of > > > > > out-of-process pdf is too complicated. > > > > > However as I understand viewing and printing of PDFs would not be > > available > > > > > anyway. > > > > > > > > > > So I guess changes in this file would not help them. > > > > > > > > Maybe ask Marshall and see if they have PPAPI support in general? > > > > > > CEF supports: > > > (1) in-process loading of the pepper pdf plugin for pdf viewing, and > > > > Which will eventually go away in favor of out-of-process PPAPI, FYI. > > > > > CEF doesn't support full printing (print preview) due to dependencies on the > > > chrome extension system (chrome uses an extension to load the print preview > UI > > > which then uses an out-of-process pdf plugin). We differentiate between no > > > printing, basic printing and full printing support in Chromium based on the > > > `enable_printing` gyp variable. CEF uses "`enable_printing': 2" which sets > > > ENABLE_PRINTING=1 and does not define ENABLE_FULL_PRINTING or > > > DISABLE_BASIC_PRINTING. > > > > But print preview doesn't use extensions. It's still using in-process PPAPI. > One > > would have to pass --out-of-process-pdf to get OOP PDF. > > Ah, my mistake. I was misremembering the conversation from > https://groups.google.com/a/chromium.org/d/msg/chromium-dev/hLBbJe_NEGw/iZFG8.... > > The in-process pdf print preview appears to have a dependency on WebUI > (chrome/browser/ui/webui/print_preview) which, like the extension system, would > be difficult to utilize outside of the Google Chrome browser. In other words, I guess your goal is to removed dependency on src/hrome and use src/content? This would be possible if we move basic printing to content. Which would
On 2014/09/26 16:41:26, Vitaly Buka wrote: > In other words, I guess your goal is to removed dependency on src/hrome and use > src/content? > This would be possible if we move basic printing to content. > Which would Yes, exactly. We're currently tracking that in https://crbug.com/311308 specifically for printing-related functionality. It would be ideal if print preview (both in-process and out-of-process pdf plugin paths) could be used without /chrome dependencies.
This change works with CEF, so lgtm.
https://codereview.chromium.org/599633007/diff/260001/chrome/common/chrome_ut... File chrome/common/chrome_utility_printing_messages.h (right): https://codereview.chromium.org/599633007/diff/260001/chrome/common/chrome_ut... chrome/common/chrome_utility_printing_messages.h:89: #if defined(ENABLE_PRINTING) && defined(OS_WIN) Do we really need the check for OS_WIN here too? It seems like these ifdefs should mirror the ones in the other file, but maybe I'm wrong.
https://codereview.chromium.org/599633007/diff/260001/chrome/common/chrome_ut... File chrome/common/chrome_utility_printing_messages.h (right): https://codereview.chromium.org/599633007/diff/260001/chrome/common/chrome_ut... chrome/common/chrome_utility_printing_messages.h:89: #if defined(ENABLE_PRINTING) && defined(OS_WIN) There are 3 files that refers to these messages pdf_to_emf_converter.cc: windows only, gyp rule service_utility_process_host.cc: windows only, gyp rule printing_handler.cc: has #if defined(OS_WIN) On 2014/09/29 00:09:37, raymes wrote: > Do we really need the check for OS_WIN here too? It seems like these ifdefs > should mirror the ones in the other file, but maybe I'm wrong.
lgtm
The CQ bit was checked by vitalybuka@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/599633007/260001
Message was sent while issue was closed.
Committed patchset #14 (id:260001) as 0ebcbf71501f73d1cc4076c623f16608b65fa3f1
Message was sent while issue was closed.
Patchset 14 (id:??) landed as https://crrev.com/3967c43228c59144237d1e92a30994ca1c640750 Cr-Commit-Position: refs/heads/master@{#297324} |