| 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 #include "chrome/utility/chrome_content_utility_client.h" | 5 #include "chrome/utility/chrome_content_utility_client.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 #include "ui/gfx/gdi_util.h" | 47 #include "ui/gfx/gdi_util.h" |
| 48 #endif // defined(OS_WIN) | 48 #endif // defined(OS_WIN) |
| 49 | 49 |
| 50 #if defined(OS_WIN) || defined(OS_MACOSX) | 50 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 51 #include "chrome/utility/media_galleries/itunes_library_parser.h" | 51 #include "chrome/utility/media_galleries/itunes_library_parser.h" |
| 52 #include "chrome/utility/media_galleries/picasa_album_table_reader.h" | 52 #include "chrome/utility/media_galleries/picasa_album_table_reader.h" |
| 53 #include "chrome/utility/media_galleries/picasa_albums_indexer.h" | 53 #include "chrome/utility/media_galleries/picasa_albums_indexer.h" |
| 54 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 54 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
| 55 | 55 |
| 56 #if defined(ENABLE_FULL_PRINTING) | 56 #if defined(ENABLE_FULL_PRINTING) |
| 57 #include "chrome/common/crash_keys.h" | 57 #include "chrome/common/child_process_logging.h" |
| 58 #include "printing/backend/print_backend.h" | 58 #include "printing/backend/print_backend.h" |
| 59 #endif | 59 #endif |
| 60 | 60 |
| 61 #if defined(ENABLE_MDNS) | 61 #if defined(ENABLE_MDNS) |
| 62 #include "chrome/utility/local_discovery/service_discovery_message_handler.h" | 62 #include "chrome/utility/local_discovery/service_discovery_message_handler.h" |
| 63 #include "content/public/common/content_switches.h" | 63 #include "content/public/common/content_switches.h" |
| 64 #endif // ENABLE_MDNS | 64 #endif // ENABLE_MDNS |
| 65 | 65 |
| 66 namespace chrome { | 66 namespace chrome { |
| 67 | 67 |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 ReleaseProcessIfNeeded(); | 497 ReleaseProcessIfNeeded(); |
| 498 } | 498 } |
| 499 | 499 |
| 500 void ChromeContentUtilityClient::OnGetPrinterCapsAndDefaults( | 500 void ChromeContentUtilityClient::OnGetPrinterCapsAndDefaults( |
| 501 const std::string& printer_name) { | 501 const std::string& printer_name) { |
| 502 #if defined(ENABLE_FULL_PRINTING) | 502 #if defined(ENABLE_FULL_PRINTING) |
| 503 scoped_refptr<printing::PrintBackend> print_backend = | 503 scoped_refptr<printing::PrintBackend> print_backend = |
| 504 printing::PrintBackend::CreateInstance(NULL); | 504 printing::PrintBackend::CreateInstance(NULL); |
| 505 printing::PrinterCapsAndDefaults printer_info; | 505 printing::PrinterCapsAndDefaults printer_info; |
| 506 | 506 |
| 507 crash_keys::ScopedPrinterInfo crash_key( | 507 child_process_logging::ScopedPrinterInfoSetter prn_info( |
| 508 print_backend->GetPrinterDriverInfo(printer_name)); | 508 print_backend->GetPrinterDriverInfo(printer_name)); |
| 509 | 509 |
| 510 if (print_backend->GetPrinterCapsAndDefaults(printer_name, &printer_info)) { | 510 if (print_backend->GetPrinterCapsAndDefaults(printer_name, &printer_info)) { |
| 511 Send(new ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Succeeded( | 511 Send(new ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Succeeded( |
| 512 printer_name, printer_info)); | 512 printer_name, printer_info)); |
| 513 } else // NOLINT | 513 } else // NOLINT |
| 514 #endif | 514 #endif |
| 515 { | 515 { |
| 516 Send(new ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Failed( | 516 Send(new ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Failed( |
| 517 printer_name)); | 517 printer_name)); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 picasa::PicasaAlbumsIndexer indexer(album_uids); | 602 picasa::PicasaAlbumsIndexer indexer(album_uids); |
| 603 indexer.ParseFolderINI(folders_inis); | 603 indexer.ParseFolderINI(folders_inis); |
| 604 | 604 |
| 605 Send(new ChromeUtilityHostMsg_IndexPicasaAlbumsContents_Finished( | 605 Send(new ChromeUtilityHostMsg_IndexPicasaAlbumsContents_Finished( |
| 606 indexer.albums_images())); | 606 indexer.albums_images())); |
| 607 ReleaseProcessIfNeeded(); | 607 ReleaseProcessIfNeeded(); |
| 608 } | 608 } |
| 609 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 609 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
| 610 | 610 |
| 611 } // namespace chrome | 611 } // namespace chrome |
| OLD | NEW |