OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PRINTING_PRINTING_MESSAGE_FILTER_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_PRINTING_MESSAGE_FILTER_H_ |
6 #define CHROME_BROWSER_PRINTING_PRINTING_MESSAGE_FILTER_H_ | 6 #define CHROME_BROWSER_PRINTING_PRINTING_MESSAGE_FILTER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "content/public/browser/browser_message_filter.h" | 11 #include "content/public/browser/browser_message_filter.h" |
12 | 12 |
13 #if defined(OS_WIN) | 13 #if defined(OS_WIN) |
14 #include "base/shared_memory.h" | 14 #include "base/shared_memory.h" |
15 #endif | 15 #endif |
16 | 16 |
17 class FilePath; | |
18 struct PrintHostMsg_ScriptedPrint_Params; | 17 struct PrintHostMsg_ScriptedPrint_Params; |
19 class Profile; | 18 class Profile; |
20 class ProfileIOData; | 19 class ProfileIOData; |
21 | 20 |
22 namespace base { | 21 namespace base { |
23 class DictionaryValue; | 22 class DictionaryValue; |
| 23 class FilePath; |
24 } | 24 } |
25 | 25 |
26 namespace content { | 26 namespace content { |
27 class WebContents; | 27 class WebContents; |
28 } | 28 } |
29 | 29 |
30 namespace printing { | 30 namespace printing { |
31 class PrinterQuery; | 31 class PrinterQuery; |
32 class PrintJobManager; | 32 class PrintJobManager; |
33 } | 33 } |
(...skipping 19 matching lines...) Expand all Loading... |
53 void OnDuplicateSection(base::SharedMemoryHandle renderer_handle, | 53 void OnDuplicateSection(base::SharedMemoryHandle renderer_handle, |
54 base::SharedMemoryHandle* browser_handle); | 54 base::SharedMemoryHandle* browser_handle); |
55 #endif | 55 #endif |
56 | 56 |
57 #if defined(OS_CHROMEOS) | 57 #if defined(OS_CHROMEOS) |
58 // Used to ask the browser allocate a temporary file for the renderer | 58 // Used to ask the browser allocate a temporary file for the renderer |
59 // to fill in resulting PDF in renderer. | 59 // to fill in resulting PDF in renderer. |
60 void OnAllocateTempFileForPrinting(base::FileDescriptor* temp_file_fd, | 60 void OnAllocateTempFileForPrinting(base::FileDescriptor* temp_file_fd, |
61 int* sequence_number); | 61 int* sequence_number); |
62 void OnTempFileForPrintingWritten(int render_view_id, int sequence_number); | 62 void OnTempFileForPrintingWritten(int render_view_id, int sequence_number); |
63 void CreatePrintDialogForFile(int render_view_id, const FilePath& path); | 63 void CreatePrintDialogForFile(int render_view_id, const base::FilePath& path); |
64 #endif | 64 #endif |
65 | 65 |
66 // Given a render_view_id get the corresponding WebContents. | 66 // Given a render_view_id get the corresponding WebContents. |
67 // Must be called on the UI thread. | 67 // Must be called on the UI thread. |
68 content::WebContents* GetWebContentsForRenderView(int render_view_id); | 68 content::WebContents* GetWebContentsForRenderView(int render_view_id); |
69 | 69 |
70 // GetPrintSettingsForRenderView must be called via PostTask and | 70 // GetPrintSettingsForRenderView must be called via PostTask and |
71 // base::Bind. Collapse the settings-specific params into a | 71 // base::Bind. Collapse the settings-specific params into a |
72 // struct to avoid running into issues with too many params | 72 // struct to avoid running into issues with too many params |
73 // to base::Bind. | 73 // to base::Bind. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 printing::PrintJobManager* print_job_manager_; | 114 printing::PrintJobManager* print_job_manager_; |
115 | 115 |
116 ProfileIOData* profile_io_data_; | 116 ProfileIOData* profile_io_data_; |
117 | 117 |
118 int render_process_id_; | 118 int render_process_id_; |
119 | 119 |
120 DISALLOW_COPY_AND_ASSIGN(PrintingMessageFilter); | 120 DISALLOW_COPY_AND_ASSIGN(PrintingMessageFilter); |
121 }; | 121 }; |
122 | 122 |
123 #endif // CHROME_BROWSER_PRINTING_PRINTING_MESSAGE_FILTER_H_ | 123 #endif // CHROME_BROWSER_PRINTING_PRINTING_MESSAGE_FILTER_H_ |
OLD | NEW |