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

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
« no previous file with comments | « chrome/browser/local_discovery/privet_http.h ('k') | chrome/browser/local_discovery/privet_http_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8cf95ccf33c1506713319c5d17c6f0e9ca2c4c8e 100644
--- a/chrome/browser/local_discovery/privet_http_impl.h
+++ b/chrome/browser/local_discovery/privet_http_impl.h
@@ -9,6 +9,7 @@
#include "base/callback.h"
#include "base/file_util.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/local_discovery/privet_http.h"
@@ -156,8 +157,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(base::RefCountedBytes* data) OVERRIDE;
virtual void SetTicket(const std::string& ticket) OVERRIDE;
@@ -167,6 +167,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 +193,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 +210,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 +228,7 @@ class PrivetLocalPrintOperationImpl
scoped_ptr<PrivetURLFetcher> url_fetcher_;
scoped_ptr<PrivetInfoOperation> info_operation_;
+ scoped_ptr<PWGRasterConverter> pwg_raster_converter_;
base::WeakPtrFactory<PrivetLocalPrintOperationImpl> weak_factory_;
};
« no previous file with comments | « chrome/browser/local_discovery/privet_http.h ('k') | chrome/browser/local_discovery/privet_http_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698