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

Side by Side Diff: components/printing/common/printing.mojom

Issue 2477283002: Convert printing IPCs to Mojo
Patch Set: Fix more Windows compile errors Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 module printing.mojom;
6
7 import "mojo/common/file.mojom";
8 import "mojo/common/string16.mojom";
9
10 [Native]
11 struct PwgRasterSettings;
12
13 [Native]
14 struct PrinterCapsAndDefaults;
15
16 [Native]
17 struct PrinterSemanticCapsAndDefaults;
18
19 [Native]
20 struct LOGFONT; // Windows-only
21
22 [Native]
23 struct PdfRenderSettings;
24
25 // Called by the utility process to have the browser do font pre-caching.
26 interface FontPreCaching {
27 // Windows-only:
28
29 // Request that the given font characters be loaded by the browser so it's
30 // cached by the OS. Please see
31 // PdfToEmfUtilityProcessHostClient::OnPreCacheFontCharacters for details.
32 [Sync]
33 PreCacheFontCharacters(LOGFONT font_data,
34 mojo.common.mojom.String16 characters) => ();
35 };
36
37 // These are messages from the browser to the utility process.
38 interface Printing {
39 // Tell the utility process to render the given PDF into a PWGRaster. Returns
40 // whether the rendering the PDF to PWG succeeded or not.
41 RenderPDFPagesToPWGRaster(
42 mojo.common.mojom.File input_pdf_file,
43 PdfRenderSettings settings,
44 PwgRasterSettings bitmap_settings,
45 mojo.common.mojom.File output_pwg_file) => (bool success);
46
47 // Tells the utility process to get capabilities and defaults for the
48 // specified printer. Used on Windows to isolate the service process from
49 // printer driver crashes by executing this in a separate process. This does
50 // not run in a sandbox. If the method fails |caps_and_defaults| will be null.
51 GetPrinterCapsAndDefaults(string printer_name) =>
52 (PrinterCapsAndDefaults? caps_and_defaults);
53
54 // Tells the utility process to get capabilities and defaults for the
55 // specified printer. Used on Windows to isolate the service process from
56 // printer driver crashes by executing this in a separate process. This does
57 // not run in a sandbox. Returns result as
58 // printing::PrinterSemanticCapsAndDefaults. If the method fails
59 // |caps_and_defaults| will be null.
60 GetPrinterSemanticCapsAndDefaults(string printer_name) =>
61 (PrinterSemanticCapsAndDefaults? caps_and_defaults);
62
63 // Windows-only:
64
65 // Tell the utility process to start rendering the given PDF into a
66 // metafile. |page_count| is 0, if loading failed. Utility process would be
67 // alive until RenderPDFPagesToMetafiles_Stop is called.
68 RenderPDFPagesToMetafiles(
69 mojo.common.mojom.File input_file,
70 PdfRenderSettings settings,
71 bool print_text_with_gdi) => (int32 page_count);
72
73 // Requests conversion of the next page.
74 RenderPDFPagesToMetafilesGetPage(int32 page_number,
75 mojo.common.mojom.File output_file) =>
76 (bool success, float scale_factor);
77 };
78
79 // Create a printing interface. This is done using a factory so we can pass a
80 // |FontPreCaching| callback interface to the receiver side before any of the
81 // methods on |Printing| are called.
82 interface PrintingFactory {
83 // Creates a new connection using the |printing| pipe.
84 MakePrinting(Printing& printing, FontPreCaching? font_pre_caching);
85 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698