summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/services/cups_proxy/public/mojom/proxy.mojom
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/services/cups_proxy/public/mojom/proxy.mojom')
-rw-r--r--chromium/chrome/services/cups_proxy/public/mojom/proxy.mojom26
1 files changed, 24 insertions, 2 deletions
diff --git a/chromium/chrome/services/cups_proxy/public/mojom/proxy.mojom b/chromium/chrome/services/cups_proxy/public/mojom/proxy.mojom
index 24129b6b802..7561c85f86c 100644
--- a/chromium/chrome/services/cups_proxy/public/mojom/proxy.mojom
+++ b/chromium/chrome/services/cups_proxy/public/mojom/proxy.mojom
@@ -5,6 +5,28 @@
// NOTE: This mojom should be kept in sync with the copy in Chromium OS's repo
// in TODO(crbug.com/945409): Update this with CrOS side mojom copy.
-module chromeos.printing.mojom;
+module cups_proxy.mojom;
-// TODO(crbug.com/945409): Add proxy method.
+struct HttpHeader {
+ string key;
+ string value;
+};
+
+// Implemented by the CupsProxyService; this service runs in the browser process
+// and supports serving CUPS printing requests from VMs on ChromeOS (currently
+// just PluginVM).
+interface CupsProxier {
+ // Expects, and strictly enforces, that |request| be a well-formatted IPP
+ // printing request. If so, the service integrates with the Chrome printing
+ // stack to correctly proxy it to the CUPS daemon, returning the resulting
+ // IPP response. Invalid IPP requests will generate an appropriate error IPP
+ // response.
+ //
+ // Note: This service expects only one request at a time; any further
+ // concurrent requests will fail with an empty IPP response, i.e. empty
+ // returned headers and ipp_message.
+ ProxyRequest@0(string method, string url, string version,
+ array<HttpHeader> headers, array<uint8> body) =>
+ (array<HttpHeader> headers, array<uint8> ipp_message,
+ [MinVersion=1] int32 http_status_code);
+};