| 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/ref_counted.h" | |
| 10 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
| 12 #include "content/public/utility/content_utility_client.h" | 11 #include "content/public/utility/content_utility_client.h" |
| 13 #include "printing/pdf_render_settings.h" | 12 #include "printing/pdf_render_settings.h" |
| 14 | 13 |
| 15 class ExternalProcessImporterBridge; | 14 class ExternalProcessImporterBridge; |
| 16 class FilePath; | 15 class FilePath; |
| 17 class Importer; | 16 class Importer; |
| 18 | 17 |
| 19 namespace base { | 18 namespace base { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 const gfx::Rect& render_area, | 69 const gfx::Rect& render_area, |
| 71 int render_dpi, | 70 int render_dpi, |
| 72 bool autorotate, | 71 bool autorotate, |
| 73 const std::vector<printing::PageRange>& page_ranges, | 72 const std::vector<printing::PageRange>& page_ranges, |
| 74 int* highest_rendered_page_number, | 73 int* highest_rendered_page_number, |
| 75 double* scale_factor); | 74 double* scale_factor); |
| 76 #endif // defined(OS_WIN) | 75 #endif // defined(OS_WIN) |
| 77 | 76 |
| 78 void OnGetPrinterCapsAndDefaults(const std::string& printer_name); | 77 void OnGetPrinterCapsAndDefaults(const std::string& printer_name); |
| 79 | 78 |
| 80 void OnImportStart( | 79 class ImportHandler; |
| 81 const importer::SourceProfile& source_profile, | 80 scoped_ptr<ImportHandler> import_handler_; |
| 82 uint16 items, | |
| 83 const base::DictionaryValue& localized_strings); | |
| 84 void OnImportCancel(); | |
| 85 void OnImportItemFinished(uint16 item); | |
| 86 | |
| 87 // The following are used with out of process profile import: | |
| 88 void ImporterCleanup(); | |
| 89 | |
| 90 // Thread that importer runs on, while ProfileImportThread handles messages | |
| 91 // from the browser process. | |
| 92 scoped_ptr<base::Thread> import_thread_; | |
| 93 | |
| 94 // Bridge object is passed to importer, so that it can send IPC calls | |
| 95 // directly back to the ProfileImportProcessHost. | |
| 96 scoped_refptr<ExternalProcessImporterBridge> bridge_; | |
| 97 | |
| 98 // A bitmask of importer::ImportItem. | |
| 99 uint16 items_to_import_; | |
| 100 | |
| 101 // Importer of the appropriate type (Firefox, Safari, IE, etc.) | |
| 102 scoped_refptr<Importer> importer_; | |
| 103 }; | 81 }; |
| 104 | 82 |
| 105 } // namespace chrome | 83 } // namespace chrome |
| 106 | 84 |
| 107 #endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ | 85 #endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ |
| OLD | NEW |