Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5259)

Unified Diff: chrome/service/cloud_print/print_system.h

Issue 3945003: Move useful printing backend code from chrome/service/cloud_print to printing... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: resolve merge conflict Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/service/cloud_print/cloud_print_proxy_backend.cc ('k') | chrome/service/cloud_print/print_system.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/cloud_print/print_system.h
===================================================================
--- chrome/service/cloud_print/print_system.h (revision 63553)
+++ chrome/service/cloud_print/print_system.h (working copy)
@@ -15,30 +15,16 @@
class DictionaryValue;
class FilePath;
+namespace printing {
+class PrintBackend;
+struct PrinterBasicInfo;
+}
+
// This is the interface for platform-specific code for cloud print
namespace cloud_print {
typedef int PlatformJobId;
-struct PrinterBasicInfo {
- PrinterBasicInfo();
- ~PrinterBasicInfo();
-
- std::string printer_name;
- std::string printer_description;
- int printer_status;
- std::map<std::string, std::string> options;
-};
-
-typedef std::vector<PrinterBasicInfo> PrinterList;
-
-struct PrinterCapsAndDefaults {
- std::string printer_capabilities;
- std::string caps_mime_type;
- std::string printer_defaults;
- std::string defaults_mime_type;
-};
-
enum PrintJobStatus {
PRINT_JOB_STATUS_INVALID,
PRINT_JOB_STATUS_IN_PROGRESS,
@@ -75,7 +61,7 @@
// obtain available printing system.
// Please note, that PrintSystem is not platform specific, but rather
// print system specific. For example, CUPS is available on both Linux and Mac,
-// but not avaialble on ChromeOS, etc. This design allows us to add more
+// but not available on ChromeOS, etc. This design allows us to add more
// functionality on some platforms, while reusing core (CUPS) functions.
class PrintSystem : public base::RefCountedThreadSafe<PrintSystem> {
public:
@@ -113,7 +99,8 @@
virtual ~PrinterWatcher();
virtual bool StartWatching(PrinterWatcher::Delegate* delegate) = 0;
virtual bool StopWatching() = 0;
- virtual bool GetCurrentPrinterInfo(PrinterBasicInfo* printer_info) = 0;
+ virtual bool GetCurrentPrinterInfo(
+ printing::PrinterBasicInfo* printer_info) = 0;
};
class JobSpooler : public base::RefCountedThreadSafe<JobSpooler> {
@@ -141,13 +128,9 @@
virtual ~PrintSystem();
- // Enumerates the list of installed local and network printers.
- virtual void EnumeratePrinters(PrinterList* printer_list) = 0;
+ // Get the printing backend.
+ virtual printing::PrintBackend* GetPrintBackend() = 0;
- // Gets the capabilities and defaults for a specific printer.
- virtual bool GetPrinterCapsAndDefaults(const std::string& printer_name,
- PrinterCapsAndDefaults* printer_info) = 0;
-
// Returns true if ticket is valid.
virtual bool ValidatePrintTicket(const std::string& printer_name,
const std::string& print_ticket_data) = 0;
@@ -157,9 +140,6 @@
PlatformJobId job_id,
PrintJobDetails *job_details) = 0;
- // Returns true if printer_name points to a valid printer.
- virtual bool IsValidPrinter(const std::string& printer_name) = 0;
-
// Factory methods to create corresponding watcher. Callee is responsible
// for deleting objects. Return NULL if failed.
virtual PrintServerWatcher* CreatePrintServerWatcher() = 0;
« no previous file with comments | « chrome/service/cloud_print/cloud_print_proxy_backend.cc ('k') | chrome/service/cloud_print/print_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698