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

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

Issue 922833004: Make PrinterProviderAPI a pure interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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_print_job.h
diff --git a/extensions/browser/api/printer_provider/printer_provider_print_job.h b/extensions/browser/api/printer_provider/printer_provider_print_job.h
new file mode 100644
index 0000000000000000000000000000000000000000..36967c4f3daa3293db495280925daae0a5fd7b39
--- /dev/null
+++ b/extensions/browser/api/printer_provider/printer_provider_print_job.h
@@ -0,0 +1,44 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_PRINT_JOB_H_
+#define EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_PRINT_JOB_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/ref_counted_memory.h"
+
+namespace extensions {
+
+// Struct describing print job that should be forwarded to an extension via
+// chrome.printerProvider.onPrintRequested event.
+struct PrinterProviderPrintJob {
+ PrinterProviderPrintJob();
+ ~PrinterProviderPrintJob();
+
+ // The id of the printer that should handle the print job. The id is
+ // formatted as <extension_id>:<printer_id>, where <extension_id> is the
+ // id of the extension that manages the printer, and <printer_id> is
+ // the the printer's id within the extension (as reported via
+ // chrome.printerProvider.onGetPrintersRequested event callback).
+ std::string printer_id;
+
+ // The print job ticket.
+ std::string ticket_json;
+
+ // Content type of the document that should be printed.
+ std::string content_type;
+
+ // The document data that should be printed.
+ scoped_refptr<base::RefCountedMemory> document_bytes;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PrinterProviderPrintJob);
+};
+
+} // namespace extensions
+
+#endif // EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_PRINT_JOB_H_

Powered by Google App Engine
This is Rietveld 408576698