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

Unified Diff: chrome/browser/printing/printing_message_filter.h

Issue 10544084: Fix crash when displaying system print dialog on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 8 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/printing/printing_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | chrome/browser/printing/printing_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698