Chromium Code Reviews| 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..ee4e1fe570579e5ab57635c927df13e330f23b0d 100644 |
| --- a/chrome/browser/ui/webui/print_preview/print_preview_handler.h |
| +++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.h |
| @@ -107,8 +107,10 @@ class PrintPreviewHandler |
| void SetPdfSavedClosureForTesting(const base::Closure& closure); |
| protected: |
| - // If |prompt_user| is true, displays a modal dialog, prompting the user to |
| - // select a file. Otherwise, just accept |default_path| and uniquify it. |
| + // If |prompt_user| is true, starts a task to create the default Save As PDF |
| + // directory if needed. |OnDirectoryCreated| will be called when this |
|
Lei Zhang
2017/06/22 01:39:56
nit: OnDirectoryCreated() is not a variable.
s/th
rbpotter
2017/06/22 19:57:26
Done.
|
| + // finishes to open the modal dialog and prompt the user. Otherwise, just |
| + // accept |default_path| and uniquify it. |
| // Protected so unit tests can access. |
| virtual void SelectFile(const base::FilePath& default_path, bool prompt_user); |
| @@ -262,6 +264,10 @@ class PrintPreviewHandler |
| // Clears initiator details for the print preview dialog. |
| void ClearInitiatorDetails(); |
| + // Called when the directory to save to has been created. Opens a modal |
| + // dialog to prompt the user to select the file for Save As PDF. |
| + void OnDirectoryCreated(base::FilePath path); |
|
Lei Zhang
2017/06/22 01:39:56
Pass by const ref.
rbpotter
2017/06/22 19:57:26
Done.
|
| + |
| // Posts a task to save |data| to pdf at |print_to_pdf_path_|. |
| void PostPrintToPdfTask(); |