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

Unified Diff: chrome/browser/local_discovery/privet_http.h

Issue 73503002: Move PDF to PWG conversion into PrivetLocalPrintOperationImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/local_discovery/privet_http_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..035e9f184c7624b09c84f12a885211387e4ba4a5 100644
--- a/chrome/browser/local_discovery/privet_http.h
+++ b/chrome/browser/local_discovery/privet_http.h
@@ -9,8 +9,13 @@
#include "base/callback.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 base {
+class RefCountedBytes;
+}
+
namespace local_discovery {
class PrivetHTTPClient;
@@ -116,10 +121,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 +131,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(base::RefCountedBytes* data) = 0;
// Optional attributes for /submitdoc. Call before calling |Start()|
// |ticket| should be in CJT format.
@@ -147,6 +145,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;
+
virtual PrivetHTTPClient* GetHTTPClient() = 0;
};
« no previous file with comments | « no previous file | chrome/browser/local_discovery/privet_http_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698