Chromium Code Reviews| 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_BROWSER_PRINTING_PRINT_SYSTEM_TASK_PROXY_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_SYSTEM_TASK_PROXY_H_ |
| 6 #define CHROME_BROWSER_PRINTING_PRINT_SYSTEM_TASK_PROXY_H_ | 6 #define CHROME_BROWSER_PRINTING_PRINT_SYSTEM_TASK_PROXY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 57 private: | 57 private: |
| 58 friend struct content::BrowserThread::DeleteOnThread< | 58 friend struct content::BrowserThread::DeleteOnThread< |
| 59 content::BrowserThread::UI>; | 59 content::BrowserThread::UI>; |
| 60 friend class base::DeleteHelper<PrintSystemTaskProxy>; | 60 friend class base::DeleteHelper<PrintSystemTaskProxy>; |
| 61 | 61 |
| 62 #if defined(UNIT_TEST) && defined(USE_CUPS) | 62 #if defined(UNIT_TEST) && defined(USE_CUPS) |
| 63 FRIEND_TEST_ALL_PREFIXES(PrintSystemTaskProxyTest, DetectDuplexModeCUPS); | 63 FRIEND_TEST_ALL_PREFIXES(PrintSystemTaskProxyTest, DetectDuplexModeCUPS); |
| 64 FRIEND_TEST_ALL_PREFIXES(PrintSystemTaskProxyTest, DetectNoDuplexModeCUPS); | 64 FRIEND_TEST_ALL_PREFIXES(PrintSystemTaskProxyTest, DetectNoDuplexModeCUPS); |
| 65 #endif | 65 #endif |
| 66 | 66 |
| 67 #if defined(USE_CUPS) | 67 bool ParsePrinterCapabilities( |
|
Robert Toscano
2012/08/22 01:05:31
Did you mean to remove the "static" modifier?
Vitaly Buka (NO REVIEWS)
2012/08/22 02:58:02
Yes. CUPS can be static, WIN can't. But static doe
| |
| 68 static bool GetPrinterCapabilitiesCUPS( | |
| 69 const printing::PrinterCapsAndDefaults& printer_info, | 68 const printing::PrinterCapsAndDefaults& printer_info, |
| 70 const std::string& printer_name, | 69 const std::string& printer_name, |
| 71 bool* set_color_as_default, | 70 bool* set_color_as_default, |
| 72 int* printer_color_space_for_color, | 71 int* printer_color_space_for_color, |
| 73 int* printer_color_space_for_black, | 72 int* printer_color_space_for_black, |
| 74 bool* set_duplex_as_default, | 73 bool* set_duplex_as_default, |
| 75 int* default_duplex_setting_value); | 74 int* default_duplex_setting_value); |
| 76 #elif defined(OS_WIN) | |
| 77 void GetPrinterCapabilitiesWin( | |
| 78 const printing::PrinterCapsAndDefaults& printer_info, | |
| 79 bool* set_color_as_default, | |
| 80 int* printer_color_space_for_color, | |
| 81 int* printer_color_space_for_black, | |
| 82 bool* set_duplex_as_default, | |
| 83 int* default_duplex_setting_value); | |
| 84 #endif | |
| 85 | 75 |
| 86 void SendDefaultPrinter(const std::string* default_printer, | 76 void SendDefaultPrinter(const std::string& default_printer, |
| 87 const std::string* cloud_print_data); | 77 const std::string& cloud_print_data); |
| 88 void SetupPrinterList(base::ListValue* printers); | 78 void SetupPrinterList(base::ListValue* printers); |
| 89 void SendPrinterCapabilities(base::DictionaryValue* settings_info); | 79 void SendPrinterCapabilities(base::DictionaryValue* settings_info); |
| 80 void SendFailedToGetPrinterCapabilities(const std::string& printer_name); | |
| 90 | 81 |
| 91 ~PrintSystemTaskProxy(); | 82 ~PrintSystemTaskProxy(); |
| 92 | 83 |
| 93 base::WeakPtr<PrintPreviewHandler> handler_; | 84 base::WeakPtr<PrintPreviewHandler> handler_; |
| 94 | 85 |
| 95 scoped_refptr<printing::PrintBackend> print_backend_; | 86 scoped_refptr<printing::PrintBackend> print_backend_; |
| 96 | 87 |
| 97 bool has_logged_printers_count_; | 88 bool has_logged_printers_count_; |
| 98 | 89 |
| 99 DISALLOW_COPY_AND_ASSIGN(PrintSystemTaskProxy); | 90 DISALLOW_COPY_AND_ASSIGN(PrintSystemTaskProxy); |
| 100 }; | 91 }; |
| 101 | 92 |
| 102 #endif // CHROME_BROWSER_PRINTING_PRINT_SYSTEM_TASK_PROXY_H_ | 93 #endif // CHROME_BROWSER_PRINTING_PRINT_SYSTEM_TASK_PROXY_H_ |
| OLD | NEW |