Index: chrome/browser/local_discovery/privet_http.h |
diff --git a/chrome/browser/local_discovery/privet_http.h b/chrome/browser/local_discovery/privet_http.h |
index 1c38a1724cfe51b1424367ff236956c45b57225b..6bcc13a2148195c50a81c72b1efac2761b0242fd 100644 |
--- a/chrome/browser/local_discovery/privet_http.h |
+++ b/chrome/browser/local_discovery/privet_http.h |
@@ -8,7 +8,10 @@ |
#include <string> |
#include "base/callback.h" |
+#include "base/memory/ref_counted.h" |
+#include "base/memory/ref_counted_memory.h" |
#include "chrome/browser/local_discovery/privet_url_fetcher.h" |
+#include "chrome/browser/local_discovery/pwg_raster_converter.h" |
#include "net/base/host_port_pair.h" |
namespace local_discovery { |
@@ -116,10 +119,6 @@ class PrivetLocalPrintOperation { |
class Delegate { |
public: |
virtual ~Delegate() {} |
- virtual void OnPrivetPrintingRequestPDF( |
- const PrivetLocalPrintOperation* print_operation) = 0; |
- virtual void OnPrivetPrintingRequestPWGRaster( |
- const PrivetLocalPrintOperation* print_operation) = 0; |
virtual void OnPrivetPrintingDone( |
const PrivetLocalPrintOperation* print_operation) = 0; |
virtual void OnPrivetPrintingError( |
@@ -130,12 +129,9 @@ class PrivetLocalPrintOperation { |
virtual void Start() = 0; |
- // One of thsese should be called ONLY after |OnPrivetPrintingRequestPDF| or |
- // |OnPrivetPrintingRequestPWGRaster| are called on the delegate. Data should |
- // be in PDF or PWG format depending on what is requested by the local print |
- // operation. |
- virtual void SendData(const std::string& data) = 0; |
- virtual void SendDataFile(const base::FilePath& data) = 0; |
+ |
+ // Required print data. MUST be called before calling |Start()|. |
+ virtual void SetData(scoped_refptr<base::RefCountedBytes> data) = 0; |
Vitaly Buka (NO REVIEWS)
2013/11/15 06:48:38
just base::RefCountedBytes*
Noam Samuel
2013/11/15 19:13:46
Done.
|
// Optional attributes for /submitdoc. Call before calling |Start()| |
// |ticket| should be in CJT format. |
@@ -147,6 +143,10 @@ class PrivetLocalPrintOperation { |
// to Google Cloud Print. |
virtual void SetOffline(bool offline) = 0; |
+ // For testing, inject an alternative PWG raster converter. |
+ virtual void SetPWGRasterConverterForTesting( |
+ scoped_ptr<PWGRasterConverter> pwg_raster_converter) = 0; |
+ |
Vitaly Buka (NO REVIEWS)
2013/11/15 06:48:38
same
Noam Samuel
2013/11/15 19:13:46
Using a scoped_ptr denotes the transfer of ownersh
|
virtual PrivetHTTPClient* GetHTTPClient() = 0; |
}; |