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_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 int location, int creation_flags); | 47 int location, int creation_flags); |
48 void OnUnpackWebResource(const std::string& resource_data); | 48 void OnUnpackWebResource(const std::string& resource_data); |
49 void OnParseUpdateManifest(const std::string& xml); | 49 void OnParseUpdateManifest(const std::string& xml); |
50 void OnDecodeImage(const std::vector<unsigned char>& encoded_data); | 50 void OnDecodeImage(const std::vector<unsigned char>& encoded_data); |
51 void OnDecodeImageBase64(const std::string& encoded_data); | 51 void OnDecodeImageBase64(const std::string& encoded_data); |
52 void OnRenderPDFPagesToMetafile( | 52 void OnRenderPDFPagesToMetafile( |
53 base::PlatformFile pdf_file, | 53 base::PlatformFile pdf_file, |
54 const base::FilePath& metafile_path, | 54 const base::FilePath& metafile_path, |
55 const printing::PdfRenderSettings& settings, | 55 const printing::PdfRenderSettings& settings, |
56 const std::vector<printing::PageRange>& page_ranges); | 56 const std::vector<printing::PageRange>& page_ranges); |
| 57 void OnRenderPDFPagesToPWGRaster( |
| 58 IPC::PlatformFileForTransit pdf_transit, |
| 59 const printing::PdfRenderSettings& settings, |
| 60 IPC::PlatformFileForTransit bitmap_transit); |
57 void OnRobustJPEGDecodeImage( | 61 void OnRobustJPEGDecodeImage( |
58 const std::vector<unsigned char>& encoded_data); | 62 const std::vector<unsigned char>& encoded_data); |
59 void OnParseJSON(const std::string& json); | 63 void OnParseJSON(const std::string& json); |
60 | 64 |
61 #if defined(OS_CHROMEOS) | 65 #if defined(OS_CHROMEOS) |
62 void OnCreateZipFile(const base::FilePath& src_dir, | 66 void OnCreateZipFile(const base::FilePath& src_dir, |
63 const std::vector<base::FilePath>& src_relative_paths, | 67 const std::vector<base::FilePath>& src_relative_paths, |
64 const base::FileDescriptor& dest_fd); | 68 const base::FileDescriptor& dest_fd); |
65 #endif // defined(OS_CHROMEOS) | 69 #endif // defined(OS_CHROMEOS) |
66 | 70 |
67 #if defined(OS_WIN) | 71 #if defined(OS_WIN) |
68 // Helper method for Windows. | 72 // Helper method for Windows. |
69 // |highest_rendered_page_number| is set to -1 on failure to render any page. | 73 // |highest_rendered_page_number| is set to -1 on failure to render any page. |
70 bool RenderPDFToWinMetafile( | 74 bool RenderPDFToWinMetafile( |
71 base::PlatformFile pdf_file, | 75 base::PlatformFile pdf_file, |
72 const base::FilePath& metafile_path, | 76 const base::FilePath& metafile_path, |
73 const printing::PdfRenderSettings& settings, | 77 const printing::PdfRenderSettings& settings, |
74 const std::vector<printing::PageRange>& page_ranges, | 78 const std::vector<printing::PageRange>& page_ranges, |
75 int* highest_rendered_page_number, | 79 int* highest_rendered_page_number, |
76 double* scale_factor); | 80 double* scale_factor); |
77 #endif // defined(OS_WIN) | 81 #endif // defined(OS_WIN) |
78 | 82 |
| 83 bool RenderPDFPagesToPWGRaster( |
| 84 base::PlatformFile pdf_file, |
| 85 const printing::PdfRenderSettings& settings, |
| 86 base::PlatformFile bitmap_file); |
| 87 |
79 void OnGetPrinterCapsAndDefaults(const std::string& printer_name); | 88 void OnGetPrinterCapsAndDefaults(const std::string& printer_name); |
80 void OnStartupPing(); | 89 void OnStartupPing(); |
81 void OnAnalyzeZipFileForDownloadProtection( | 90 void OnAnalyzeZipFileForDownloadProtection( |
82 const IPC::PlatformFileForTransit& zip_file); | 91 const IPC::PlatformFileForTransit& zip_file); |
83 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 92 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
84 void OnCheckMediaFile(int64 milliseconds_of_decoding, | 93 void OnCheckMediaFile(int64 milliseconds_of_decoding, |
85 const IPC::PlatformFileForTransit& media_file); | 94 const IPC::PlatformFileForTransit& media_file); |
86 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) | 95 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) |
87 | 96 |
88 #if defined(OS_WIN) | 97 #if defined(OS_WIN) |
(...skipping 19 matching lines...) Expand all Loading... |
108 | 117 |
109 typedef ScopedVector<UtilityMessageHandler> Handlers; | 118 typedef ScopedVector<UtilityMessageHandler> Handlers; |
110 Handlers handlers_; | 119 Handlers handlers_; |
111 | 120 |
112 DISALLOW_COPY_AND_ASSIGN(ChromeContentUtilityClient); | 121 DISALLOW_COPY_AND_ASSIGN(ChromeContentUtilityClient); |
113 }; | 122 }; |
114 | 123 |
115 } // namespace chrome | 124 } // namespace chrome |
116 | 125 |
117 #endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ | 126 #endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ |
OLD | NEW |