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 |
index 36967c4f3daa3293db495280925daae0a5fd7b39..81fc9b8674fd47fd1aa6aabfa60cb8e4f548803f 100644 |
--- a/extensions/browser/api/printer_provider/printer_provider_print_job.h |
+++ b/extensions/browser/api/printer_provider/printer_provider_print_job.h |
@@ -7,7 +7,8 @@ |
#include <string> |
-#include "base/macros.h" |
+#include "base/files/file.h" |
+#include "base/files/file_path.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/ref_counted_memory.h" |
@@ -15,6 +16,9 @@ namespace extensions { |
// Struct describing print job that should be forwarded to an extension via |
// chrome.printerProvider.onPrintRequested event. |
+// TODO(tbarzic): This should probably be a class and have some methods, e.g. |
+// whether the job is initialized and whether the data is described using a file |
+// or bytes. |
struct PrinterProviderPrintJob { |
PrinterProviderPrintJob(); |
~PrinterProviderPrintJob(); |
@@ -32,11 +36,17 @@ struct PrinterProviderPrintJob { |
// Content type of the document that should be printed. |
std::string content_type; |
- // The document data that should be printed. |
+ // The document data that should be printed. Should be NULL if document data |
+ // is kept in a file. |
scoped_refptr<base::RefCountedMemory> document_bytes; |
- private: |
- DISALLOW_COPY_AND_ASSIGN(PrinterProviderPrintJob); |
+ // Path of the file which contains data to be printed. Should be set only if |
+ // |document_bytes| are NULL. |
+ base::FilePath document_path; |
+ |
+ // Information about the file which contains data to be printed. Should be |
+ // set only if |document_path| is set. |
+ base::File::Info file_info; |
}; |
} // namespace extensions |