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

Side by Side Diff: chrome/browser/ui/webui/print_preview_handler.h

Issue 6759044: Prepopulating "Print To PDF" select file dialog with a suggested filename and path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 14 matching lines...) Expand all
25 PrintPreviewHandler(); 25 PrintPreviewHandler();
26 virtual ~PrintPreviewHandler(); 26 virtual ~PrintPreviewHandler();
27 27
28 // WebUIMessageHandler implementation. 28 // WebUIMessageHandler implementation.
29 virtual void RegisterMessages(); 29 virtual void RegisterMessages();
30 30
31 // SelectFileDialog::Listener implementation. 31 // SelectFileDialog::Listener implementation.
32 virtual void FileSelected(const FilePath& path, int index, void* params); 32 virtual void FileSelected(const FilePath& path, int index, void* params);
33 33
34 // Displays a modal dialog, prompting the user to select a file. 34 // Displays a modal dialog, prompting the user to select a file.
35 void SelectFile(); 35 void SelectFile(const FilePath& default_filename);
Lei Zhang 2011/04/01 01:05:35 nit: default_path.
dpapad 2011/04/01 02:32:15 Done.
36 36
37 private: 37 private:
38 friend class EnumeratePrintersTaskProxy; 38 friend class EnumeratePrintersTaskProxy;
39 39
40 // Get the list of printers. |args| is unused. 40 // Get the list of printers. |args| is unused.
41 void HandleGetPrinters(const ListValue* args); 41 void HandleGetPrinters(const ListValue* args);
42 42
43 // Ask the initiator renderer to generate a preview. 43 // Ask the initiator renderer to generate a preview.
44 // First element of |args| is a job settings JSON string. 44 // First element of |args| is a job settings JSON string.
45 void HandleGetPreview(const ListValue* args); 45 void HandleGetPreview(const ListValue* args);
(...skipping 23 matching lines...) Expand all
69 // Set to true if the preview should be landscape. 69 // Set to true if the preview should be landscape.
70 bool landscape_; 70 bool landscape_;
71 71
72 // The underlying dialog object. 72 // The underlying dialog object.
73 scoped_refptr<SelectFileDialog> select_file_dialog_; 73 scoped_refptr<SelectFileDialog> select_file_dialog_;
74 74
75 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); 75 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler);
76 }; 76 };
77 77
78 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ 78 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698