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

Unified Diff: extensions/browser/api/printer_provider/printer_provider_api.h

Issue 973993003: Instead of ArrayBuffer, pass blob with printerProvider.onPrintRequested (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: kalman feedback Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/api/printer_provider/printer_provider_api.h
diff --git a/extensions/browser/api/printer_provider/printer_provider_api.h b/extensions/browser/api/printer_provider/printer_provider_api.h
index c2317d1cf14fe634693e45025d20fdbd74ea27a0..da4028d0a3e5477283bcb9a869f6adf0942f4bb4 100644
--- a/extensions/browser/api/printer_provider/printer_provider_api.h
+++ b/extensions/browser/api/printer_provider/printer_provider_api.h
@@ -20,6 +20,7 @@ class BrowserContext;
}
namespace extensions {
+class Extension;
struct PrinterProviderPrintJob;
}
@@ -40,11 +41,6 @@ class PrinterProviderAPI : public KeyedService {
// Returns generic error string for print request.
static std::string GetDefaultPrintError();
- // The API currently cannot handle very large files, so the document size that
- // may be sent to an extension is restricted.
- // TODO(tbarzic): Fix the API to support huge documents.
- static const int kMaxDocumentSize = 50 * 1000 * 1000;
-
~PrinterProviderAPI() override {}
virtual void DispatchGetPrintersRequested(
@@ -69,6 +65,12 @@ class PrinterProviderAPI : public KeyedService {
// must not be null.
virtual void DispatchPrintRequested(const PrinterProviderPrintJob& job,
const PrintCallback& callback) = 0;
+
+ // Returns print job associated with the print request with id |request_id|
+ // for extension |extension|.
+ // It should return NULL if the job for the request does not exist.
+ virtual const PrinterProviderPrintJob* GetPrintJob(const Extension* extension,
+ int request_id) const = 0;
};
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698