OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/platform_file.h" | 12 #include "base/platform_file.h" |
13 #include "content/utility/content_utility_client.h" | 13 #include "content/utility/content_utility_client.h" |
| 14 #include "printing/pdf_render_settings.h" |
14 | 15 |
15 class ExternalProcessImporterBridge; | 16 class ExternalProcessImporterBridge; |
16 class FilePath; | 17 class FilePath; |
17 class Importer; | 18 class Importer; |
18 | 19 |
19 namespace base { | 20 namespace base { |
20 class DictionaryValue; | 21 class DictionaryValue; |
21 class Thread; | 22 class Thread; |
22 } | 23 } |
23 | 24 |
(...skipping 24 matching lines...) Expand all Loading... |
48 | 49 |
49 // IPC message handlers. | 50 // IPC message handlers. |
50 void OnUnpackExtension(const FilePath& extension_path); | 51 void OnUnpackExtension(const FilePath& extension_path); |
51 void OnUnpackWebResource(const std::string& resource_data); | 52 void OnUnpackWebResource(const std::string& resource_data); |
52 void OnParseUpdateManifest(const std::string& xml); | 53 void OnParseUpdateManifest(const std::string& xml); |
53 void OnDecodeImage(const std::vector<unsigned char>& encoded_data); | 54 void OnDecodeImage(const std::vector<unsigned char>& encoded_data); |
54 void OnDecodeImageBase64(const std::string& encoded_data); | 55 void OnDecodeImageBase64(const std::string& encoded_data); |
55 void OnRenderPDFPagesToMetafile( | 56 void OnRenderPDFPagesToMetafile( |
56 base::PlatformFile pdf_file, | 57 base::PlatformFile pdf_file, |
57 const FilePath& metafile_path, | 58 const FilePath& metafile_path, |
58 const gfx::Rect& render_area, | 59 const printing::PdfRenderSettings& pdf_render_settings, |
59 int render_dpi, | |
60 const std::vector<printing::PageRange>& page_ranges); | 60 const std::vector<printing::PageRange>& page_ranges); |
61 void OnParseJSON(const std::string& json); | 61 void OnParseJSON(const std::string& json); |
62 | 62 |
63 #if defined(OS_WIN) | 63 #if defined(OS_WIN) |
64 // Helper method for Windows. | 64 // Helper method for Windows. |
65 // |highest_rendered_page_number| is set to -1 on failure to render any page. | 65 // |highest_rendered_page_number| is set to -1 on failure to render any page. |
66 bool RenderPDFToWinMetafile( | 66 bool RenderPDFToWinMetafile( |
67 base::PlatformFile pdf_file, | 67 base::PlatformFile pdf_file, |
68 const FilePath& metafile_path, | 68 const FilePath& metafile_path, |
69 const gfx::Rect& render_area, | 69 const gfx::Rect& render_area, |
70 int render_dpi, | 70 int render_dpi, |
| 71 bool autorotate, |
71 const std::vector<printing::PageRange>& page_ranges, | 72 const std::vector<printing::PageRange>& page_ranges, |
72 int* highest_rendered_page_number); | 73 int* highest_rendered_page_number); |
73 #endif // defined(OS_WIN) | 74 #endif // defined(OS_WIN) |
74 | 75 |
75 void OnGetPrinterCapsAndDefaults(const std::string& printer_name); | 76 void OnGetPrinterCapsAndDefaults(const std::string& printer_name); |
76 | 77 |
77 void OnImportStart( | 78 void OnImportStart( |
78 const importer::SourceProfile& source_profile, | 79 const importer::SourceProfile& source_profile, |
79 uint16 items, | 80 uint16 items, |
80 const base::DictionaryValue& localized_strings); | 81 const base::DictionaryValue& localized_strings); |
(...skipping 14 matching lines...) Expand all Loading... |
95 // A bitmask of importer::ImportItem. | 96 // A bitmask of importer::ImportItem. |
96 uint16 items_to_import_; | 97 uint16 items_to_import_; |
97 | 98 |
98 // Importer of the appropriate type (Firefox, Safari, IE, etc.) | 99 // Importer of the appropriate type (Firefox, Safari, IE, etc.) |
99 scoped_refptr<Importer> importer_; | 100 scoped_refptr<Importer> importer_; |
100 }; | 101 }; |
101 | 102 |
102 } // namespace chrome | 103 } // namespace chrome |
103 | 104 |
104 #endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ | 105 #endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ |
OLD | NEW |