Chromium Code Reviews| Index: chrome/browser/ui/webui/print_preview_handler.h |
| diff --git a/chrome/browser/ui/webui/print_preview_handler.h b/chrome/browser/ui/webui/print_preview_handler.h |
| index 6be0cbf97636ad271bfd506c3a0cb237766ae84d..3938e59df8aa61e7544f606b26740e52d74cdabc 100644 |
| --- a/chrome/browser/ui/webui/print_preview_handler.h |
| +++ b/chrome/browser/ui/webui/print_preview_handler.h |
| @@ -9,7 +9,9 @@ |
| #include <string> |
| #include "base/memory/ref_counted.h" |
| +#include "base/memory/scoped_ptr.h" |
| #include "base/memory/weak_ptr.h" |
| +#include "base/values.h" |
|
vandebo (ex-Chrome)
2011/09/07 21:38:19
Declare only.
dpapad
2011/09/07 23:42:39
Done.
|
| #include "chrome/browser/printing/print_view_manager_observer.h" |
| #include "chrome/browser/ui/shell_dialogs.h" |
| #include "content/browser/webui/web_ui.h" |
| @@ -79,10 +81,14 @@ class PrintPreviewHandler : public WebUIMessageHandler, |
| // is a job settings JSON string. |
| void HandleGetPreview(const base::ListValue* args); |
| - // Gets the job settings from Web UI and initiate printing. First element of |
| + // Gets the job settings from Web UI and initiate printing. First element of |
| // |args| is a job settings JSON string. |
| void HandlePrint(const base::ListValue* args); |
| + // Handles printing to PDF. |settings| points to a dictionary containing all |
| + // the print request parameters. |
| + void HandlePrintToPdf(const DictionaryValue* settings); |
|
kmadhusu
2011/09/07 20:42:57
Why do you need a pointer here? Pass it as a refer
dpapad
2011/09/07 23:42:39
Done.
|
| + |
| // Handles the request to hide the preview tab for printing. |args| is unused. |
| void HandleHidePreview(const base::ListValue* args); |
| @@ -161,6 +167,9 @@ class PrintPreviewHandler : public WebUIMessageHandler, |
| // Clears initiator tab details for this preview tab. |
| void ClearInitiatorTabDetails(); |
| + // Posts a task to save to pdf at |path|. |
| + void PostPrintToPdfTask(const FilePath& path); |
| + |
| // Pointer to current print system. |
| scoped_refptr<printing::PrintBackend> print_backend_; |
| @@ -185,6 +194,10 @@ class PrintPreviewHandler : public WebUIMessageHandler, |
| // Whether we have already logged the number of printers this session. |
| bool has_logged_printers_count_; |
| + // Holds the path to the pending print to pdf request. It is empty if no such |
| + // request exists. |
| + scoped_ptr<FilePath> pending_print_to_pdf_path_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
| }; |