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

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: Address comments 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/print_preview/print_preview_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e0223081b23bce73114a3d35c354c0e366ded37d 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 it
+ // 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(const base::FilePath& path);
+
// Posts a task to save |data| to pdf at |print_to_pdf_path_|.
void PostPrintToPdfTask();
« no previous file with comments | « no previous file | chrome/browser/ui/webui/print_preview/print_preview_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698