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

Unified Diff: chrome/browser/local_discovery/privet_http_impl.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
Index: chrome/browser/local_discovery/privet_http_impl.h
diff --git a/chrome/browser/local_discovery/privet_http_impl.h b/chrome/browser/local_discovery/privet_http_impl.h
index 3fbbcaccfcd402724669738498993c56b9b7ab20..16f76001ceb7ebef242442966141e3e827689b97 100644
--- a/chrome/browser/local_discovery/privet_http_impl.h
+++ b/chrome/browser/local_discovery/privet_http_impl.h
@@ -156,8 +156,7 @@ class PrivetLocalPrintOperationImpl
virtual ~PrivetLocalPrintOperationImpl();
virtual void Start() OVERRIDE;
- virtual void SendData(const std::string& data) OVERRIDE;
- virtual void SendDataFile(const base::FilePath& data) OVERRIDE;
+ virtual void SetData(scoped_refptr<base::RefCountedBytes> data) OVERRIDE;
virtual void SetTicket(const std::string& ticket) OVERRIDE;
@@ -167,6 +166,9 @@ class PrivetLocalPrintOperationImpl
virtual void SetOffline(bool offline) OVERRIDE;
+ virtual void SetPWGRasterConverterForTesting(
+ scoped_ptr<PWGRasterConverter> pwg_raster_converter) OVERRIDE;
+
virtual PrivetHTTPClient* GetHTTPClient() OVERRIDE;
virtual void OnError(PrivetURLFetcher* fetcher,
@@ -190,14 +192,16 @@ class PrivetLocalPrintOperationImpl
void DoCreatejob();
void DoSubmitdoc();
+ void StartConvertToPWG();
+ void StartPrinting();
+
void OnCapabilitiesResponse(bool has_error,
const base::DictionaryValue* value);
void OnSubmitdocResponse(bool has_error,
const base::DictionaryValue* value);
void OnCreatejobResponse(bool has_error,
const base::DictionaryValue* value);
-
- void SendDataInternal();
+ void OnPWGRasterConverted(bool success, const base::FilePath& pwg_file_path);
PrivetHTTPClientImpl* privet_client_;
PrivetLocalPrintOperation::Delegate* delegate_;
@@ -205,8 +209,8 @@ class PrivetLocalPrintOperationImpl
ResponseCallback current_response_;
std::string ticket_;
- std::string data_;
- base::FilePath data_file_;
+ scoped_refptr<base::RefCountedBytes> data_;
+ base::FilePath pwg_file_path_;
bool use_pdf_;
bool has_capabilities_;
@@ -223,6 +227,7 @@ class PrivetLocalPrintOperationImpl
scoped_ptr<PrivetURLFetcher> url_fetcher_;
scoped_ptr<PrivetInfoOperation> info_operation_;
+ scoped_ptr<PWGRasterConverter> pwg_raster_converter_;
base::WeakPtrFactory<PrivetLocalPrintOperationImpl> weak_factory_;
};

Powered by Google App Engine
This is Rietveld 408576698