Index: chrome/browser/printing/printing_message_filter.h |
diff --git a/chrome/browser/printing/printing_message_filter.h b/chrome/browser/printing/printing_message_filter.h |
index 6e1ea108b8413f7b7169bf460172d7b91e9c261f..3bbd4fe661d341bde392ccf16d4b487c6acd4d93 100644 |
--- a/chrome/browser/printing/printing_message_filter.h |
+++ b/chrome/browser/printing/printing_message_filter.h |
@@ -15,12 +15,17 @@ |
#include "base/shared_memory.h" |
#endif |
+class FilePath; |
struct PrintHostMsg_ScriptedPrint_Params; |
namespace base { |
class DictionaryValue; |
} |
+namespace content { |
+class WebContents; |
+} |
+ |
namespace printing { |
class PrinterQuery; |
class PrintJobManager; |
@@ -54,10 +59,28 @@ class PrintingMessageFilter : public content::BrowserMessageFilter { |
void OnAllocateTempFileForPrinting(base::FileDescriptor* temp_file_fd, |
int* sequence_number); |
void OnTempFileForPrintingWritten(int render_view_id, int sequence_number); |
+ void CreatePrintDialogForFile(int render_view_id, const FilePath& path); |
#endif |
- // Get the default print setting. The task is handled by the print |
- // worker thread and the UI thread. The reply occurs on the IO thread. |
+ // Given a render_view_id get the corresponding WebContents. |
+ // Must be called on the UI thread. |
+ content::WebContents* GetWebContentsForRenderView(int render_view_id); |
+ |
+ // GetPrintSettingsForRenderView must be called via PostTask and |
+ // base::Bind. Collapse the settings-specific params into a |
+ // struct to avoid running into issues with too many params |
+ // to base::Bind. |
+ struct GetPrintSettingsForRenderViewParams; |
+ |
+ // Retrieve print settings. Uses |render_view_id| to get a parent |
+ // for any UI created if needed. |
+ void GetPrintSettingsForRenderView( |
+ int render_view_id, |
+ GetPrintSettingsForRenderViewParams params, |
+ const base::Closure& callback, |
+ scoped_refptr<printing::PrinterQuery> printer_query); |
+ |
+ // Get the default print setting. |
void OnGetDefaultPrintSettings(IPC::Message* reply_msg); |
void OnGetDefaultPrintSettingsReply( |
scoped_refptr<printing::PrinterQuery> printer_query, |