Index: chrome/browser/ui/webui/print_preview/print_preview_handler.h |
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.h b/chrome/browser/ui/webui/print_preview/print_preview_handler.h |
index f18848109b4f4ab42bbecf5d9e9d774ff9ceca67..6f9218c231d4e4e87deffbf65c9f9f097dc77ae5 100644 |
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.h |
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.h |
@@ -248,7 +248,8 @@ class PrintPreviewHandler |
void SendCloudPrintEnabled(); |
// Send the PDF data to the cloud to print. |
- void SendCloudPrintJob(const base::RefCountedBytes* data); |
+ void SendCloudPrintJob(const std::string& callback_id, |
+ const base::RefCountedBytes* data); |
// Gets the initiator for the print preview dialog. |
content::WebContents* GetInitiator() const; |
@@ -292,6 +293,7 @@ class PrintPreviewHandler |
const std::string& callback_id, |
std::unique_ptr<cloud_print::PrivetHTTPClient> http_client); |
void PrivetLocalPrintUpdateClient( |
+ const std::string& callback_id, |
std::string print_ticket, |
std::string capabilities, |
gfx::Size page_size, |
@@ -303,7 +305,8 @@ class PrintPreviewHandler |
const std::string& capabilities, |
const gfx::Size& page_size); |
void SendPrivetCapabilitiesError(const std::string& id); |
- void PrintToPrivetPrinter(const std::string& printer_name, |
+ void PrintToPrivetPrinter(const std::string& callback_id, |
+ const std::string& printer_name, |
const std::string& print_ticket, |
const std::string& capabilities, |
const gfx::Size& page_size); |
@@ -348,10 +351,13 @@ class PrintPreviewHandler |
const base::DictionaryValue& capabilities); |
// Called when an extension print job is completed. |
+ // |callback_id|: The javascript callback to run. |
// |success|: Whether the job succeeded. |
// |status|: The returned print job status. Useful for reporting a specific |
// error. |
- void OnExtensionPrintResult(bool success, const std::string& status); |
+ void OnExtensionPrintResult(const std::string& callback_id, |
+ bool success, |
+ const std::string& status); |
// Register/unregister from notifications of changes done to the GAIA |
// cookie. |
@@ -407,7 +413,11 @@ class PrintPreviewHandler |
base::Closure pdf_file_saved_closure_; |
// Callback ID to be used to notify UI that privet search is finished. |
- std::string privet_callback_id_ = ""; |
+ std::string privet_search_callback_id_ = ""; |
+ |
+ std::string privet_print_callback_id_ = ""; |
+ |
+ std::string pdf_callback_id_ = ""; |
// Proxy for calls to the print backend. Lazily initialized since web_ui() is |
// not available at construction time. |