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

Unified Diff: chrome/browser/ui/webui/print_preview/print_preview_handler.h

Issue 2952043002: Print Preview: Create Save As PDF directory if it does not exist. (Closed)
Patch Set: Created 3 years, 6 months 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/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();

Powered by Google App Engine
This is Rietveld 408576698