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_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ | 5 #ifndef CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ |
6 #define CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ | 6 #define CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace gfx { | 21 namespace gfx { |
22 class Rect; | 22 class Rect; |
23 } | 23 } |
24 | 24 |
25 namespace metadata { | 25 namespace metadata { |
26 class MediaMetadataParser; | 26 class MediaMetadataParser; |
27 } | 27 } |
28 | 28 |
29 namespace printing { | 29 namespace printing { |
30 class PdfRenderSettings; | 30 class PdfRenderSettings; |
| 31 struct PwgRasterSettings; |
31 struct PageRange; | 32 struct PageRange; |
32 } | 33 } |
33 | 34 |
34 namespace chrome { | 35 namespace chrome { |
35 | 36 |
36 class UtilityMessageHandler; | 37 class UtilityMessageHandler; |
37 | 38 |
38 class ChromeContentUtilityClient : public content::ContentUtilityClient { | 39 class ChromeContentUtilityClient : public content::ContentUtilityClient { |
39 public: | 40 public: |
40 ChromeContentUtilityClient(); | 41 ChromeContentUtilityClient(); |
(...skipping 14 matching lines...) Expand all Loading... |
55 void OnDecodeImage(const std::vector<unsigned char>& encoded_data); | 56 void OnDecodeImage(const std::vector<unsigned char>& encoded_data); |
56 void OnDecodeImageBase64(const std::string& encoded_data); | 57 void OnDecodeImageBase64(const std::string& encoded_data); |
57 void OnRenderPDFPagesToMetafile( | 58 void OnRenderPDFPagesToMetafile( |
58 base::PlatformFile pdf_file, | 59 base::PlatformFile pdf_file, |
59 const base::FilePath& metafile_path, | 60 const base::FilePath& metafile_path, |
60 const printing::PdfRenderSettings& settings, | 61 const printing::PdfRenderSettings& settings, |
61 const std::vector<printing::PageRange>& page_ranges); | 62 const std::vector<printing::PageRange>& page_ranges); |
62 void OnRenderPDFPagesToPWGRaster( | 63 void OnRenderPDFPagesToPWGRaster( |
63 IPC::PlatformFileForTransit pdf_transit, | 64 IPC::PlatformFileForTransit pdf_transit, |
64 const printing::PdfRenderSettings& settings, | 65 const printing::PdfRenderSettings& settings, |
| 66 const printing::PwgRasterSettings& bitmap_settings, |
65 IPC::PlatformFileForTransit bitmap_transit); | 67 IPC::PlatformFileForTransit bitmap_transit); |
66 void OnRobustJPEGDecodeImage( | 68 void OnRobustJPEGDecodeImage( |
67 const std::vector<unsigned char>& encoded_data); | 69 const std::vector<unsigned char>& encoded_data); |
68 void OnParseJSON(const std::string& json); | 70 void OnParseJSON(const std::string& json); |
69 | 71 |
70 #if defined(OS_CHROMEOS) | 72 #if defined(OS_CHROMEOS) |
71 void OnCreateZipFile(const base::FilePath& src_dir, | 73 void OnCreateZipFile(const base::FilePath& src_dir, |
72 const std::vector<base::FilePath>& src_relative_paths, | 74 const std::vector<base::FilePath>& src_relative_paths, |
73 const base::FileDescriptor& dest_fd); | 75 const base::FileDescriptor& dest_fd); |
74 #endif // defined(OS_CHROMEOS) | 76 #endif // defined(OS_CHROMEOS) |
75 | 77 |
76 #if defined(OS_WIN) | 78 #if defined(OS_WIN) |
77 // Helper method for Windows. | 79 // Helper method for Windows. |
78 // |highest_rendered_page_number| is set to -1 on failure to render any page. | 80 // |highest_rendered_page_number| is set to -1 on failure to render any page. |
79 bool RenderPDFToWinMetafile( | 81 bool RenderPDFToWinMetafile( |
80 base::PlatformFile pdf_file, | 82 base::PlatformFile pdf_file, |
81 const base::FilePath& metafile_path, | 83 const base::FilePath& metafile_path, |
82 const printing::PdfRenderSettings& settings, | 84 const printing::PdfRenderSettings& settings, |
83 const std::vector<printing::PageRange>& page_ranges, | 85 const std::vector<printing::PageRange>& page_ranges, |
84 int* highest_rendered_page_number, | 86 int* highest_rendered_page_number, |
85 double* scale_factor); | 87 double* scale_factor); |
86 #endif // defined(OS_WIN) | 88 #endif // defined(OS_WIN) |
87 | 89 |
88 bool RenderPDFPagesToPWGRaster( | 90 bool RenderPDFPagesToPWGRaster( |
89 base::PlatformFile pdf_file, | 91 base::PlatformFile pdf_file, |
90 const printing::PdfRenderSettings& settings, | 92 const printing::PdfRenderSettings& settings, |
| 93 const printing::PwgRasterSettings& bitmap_settings, |
91 base::PlatformFile bitmap_file); | 94 base::PlatformFile bitmap_file); |
92 | 95 |
93 void OnGetPrinterCapsAndDefaults(const std::string& printer_name); | 96 void OnGetPrinterCapsAndDefaults(const std::string& printer_name); |
94 void OnGetPrinterSemanticCapsAndDefaults(const std::string& printer_name); | 97 void OnGetPrinterSemanticCapsAndDefaults(const std::string& printer_name); |
95 void OnStartupPing(); | 98 void OnStartupPing(); |
96 void OnAnalyzeZipFileForDownloadProtection( | 99 void OnAnalyzeZipFileForDownloadProtection( |
97 const IPC::PlatformFileForTransit& zip_file); | 100 const IPC::PlatformFileForTransit& zip_file); |
98 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 101 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
99 void OnCheckMediaFile(int64 milliseconds_of_decoding, | 102 void OnCheckMediaFile(int64 milliseconds_of_decoding, |
100 const IPC::PlatformFileForTransit& media_file); | 103 const IPC::PlatformFileForTransit& media_file); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 bool filter_messages_; | 137 bool filter_messages_; |
135 // A list of message_ids to filter. | 138 // A list of message_ids to filter. |
136 std::set<int> message_id_whitelist_; | 139 std::set<int> message_id_whitelist_; |
137 | 140 |
138 DISALLOW_COPY_AND_ASSIGN(ChromeContentUtilityClient); | 141 DISALLOW_COPY_AND_ASSIGN(ChromeContentUtilityClient); |
139 }; | 142 }; |
140 | 143 |
141 } // namespace chrome | 144 } // namespace chrome |
142 | 145 |
143 #endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ | 146 #endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ |
OLD | NEW |