summaryrefslogtreecommitdiffstats
path: root/printing
diff options
context:
space:
mode:
Diffstat (limited to 'printing')
-rw-r--r--printing/backend/print_backend.h6
-rw-r--r--printing/backend/print_backend_chromeos.cc24
-rw-r--r--printing/backend/print_backend_cups.cc8
-rw-r--r--printing/backend/print_backend_win.cc23
4 files changed, 30 insertions, 31 deletions
diff --git a/printing/backend/print_backend.h b/printing/backend/print_backend.h
index 8e28b2d..84a9d90 100644
--- a/printing/backend/print_backend.h
+++ b/printing/backend/print_backend.h
@@ -53,8 +53,6 @@ struct PRINTING_EXPORT PrinterCapsAndDefaults {
class PRINTING_EXPORT PrintBackend
: public base::RefCountedThreadSafe<PrintBackend> {
public:
- virtual ~PrintBackend();
-
// Enumerates the list of installed local and network printers.
virtual bool EnumeratePrinters(PrinterList* printer_list) = 0;
@@ -78,6 +76,10 @@ class PRINTING_EXPORT PrintBackend
// Return NULL if no print backend available.
static scoped_refptr<PrintBackend> CreateInstance(
const base::DictionaryValue* print_backend_settings);
+
+ protected:
+ friend class base::RefCountedThreadSafe<PrintBackend>;
+ virtual ~PrintBackend();
};
} // namespace printing
diff --git a/printing/backend/print_backend_chromeos.cc b/printing/backend/print_backend_chromeos.cc
index 767251c..003b0fd 100644
--- a/printing/backend/print_backend_chromeos.cc
+++ b/printing/backend/print_backend_chromeos.cc
@@ -12,21 +12,19 @@ namespace printing {
class PrintBackendChromeOS : public PrintBackend {
public:
PrintBackendChromeOS();
- virtual ~PrintBackendChromeOS() {}
// PrintBackend implementation.
- virtual bool EnumeratePrinters(PrinterList* printer_list);
-
- virtual std::string GetDefaultPrinterName();
-
- virtual bool GetPrinterCapsAndDefaults(const std::string& printer_name,
- PrinterCapsAndDefaults* printer_info);
-
- virtual std::string GetPrinterDriverInfo(const std::string& printer_name);
-
- virtual bool IsValidPrinter(const std::string& printer_name);
-
- private:
+ virtual bool EnumeratePrinters(PrinterList* printer_list) OVERRIDE;
+ virtual std::string GetDefaultPrinterName() OVERRIDE;
+ virtual bool GetPrinterCapsAndDefaults(
+ const std::string& printer_name,
+ PrinterCapsAndDefaults* printer_info) OVERRIDE;
+ virtual std::string GetPrinterDriverInfo(
+ const std::string& printer_name) OVERRIDE;
+ virtual bool IsValidPrinter(const std::string& printer_name) OVERRIDE;
+
+ protected:
+ virtual ~PrintBackendChromeOS() {}
};
PrintBackendChromeOS::PrintBackendChromeOS() {}
diff --git a/printing/backend/print_backend_cups.cc b/printing/backend/print_backend_cups.cc
index ae0c553..9bba09a 100644
--- a/printing/backend/print_backend_cups.cc
+++ b/printing/backend/print_backend_cups.cc
@@ -103,22 +103,20 @@ static const char kCUPSPrinterMakeModelOpt[] = "printer-make-and-model";
class PrintBackendCUPS : public PrintBackend {
public:
PrintBackendCUPS(const GURL& print_server_url, bool blocking);
- virtual ~PrintBackendCUPS() {}
// PrintBackend implementation.
virtual bool EnumeratePrinters(PrinterList* printer_list) OVERRIDE;
-
virtual std::string GetDefaultPrinterName() OVERRIDE;
-
virtual bool GetPrinterCapsAndDefaults(
const std::string& printer_name,
PrinterCapsAndDefaults* printer_info) OVERRIDE;
-
virtual std::string GetPrinterDriverInfo(
const std::string& printer_name) OVERRIDE;
-
virtual bool IsValidPrinter(const std::string& printer_name) OVERRIDE;
+ protected:
+ virtual ~PrintBackendCUPS() {}
+
private:
// Following functions are wrappers around corresponding CUPS functions.
// <functions>2() are called when print server is specified, and plain
diff --git a/printing/backend/print_backend_win.cc b/printing/backend/print_backend_win.cc
index ae178c7..8dca223 100644
--- a/printing/backend/print_backend_win.cc
+++ b/printing/backend/print_backend_win.cc
@@ -38,18 +38,19 @@ namespace printing {
class PrintBackendWin : public PrintBackend {
public:
PrintBackendWin() {}
- virtual ~PrintBackendWin() {}
-
- virtual bool EnumeratePrinters(PrinterList* printer_list);
-
- virtual std::string GetDefaultPrinterName();
- virtual bool GetPrinterCapsAndDefaults(const std::string& printer_name,
- PrinterCapsAndDefaults* printer_info);
-
- virtual std::string GetPrinterDriverInfo(const std::string& printer_name);
-
- virtual bool IsValidPrinter(const std::string& printer_name);
+ // PrintBackend implementation.
+ virtual bool EnumeratePrinters(PrinterList* printer_list) OVERRIDE;
+ virtual std::string GetDefaultPrinterName() OVERRIDE;
+ virtual bool GetPrinterCapsAndDefaults(
+ const std::string& printer_name,
+ PrinterCapsAndDefaults* printer_info) OVERRIDE;
+ virtual std::string GetPrinterDriverInfo(
+ const std::string& printer_name) OVERRIDE;
+ virtual bool IsValidPrinter(const std::string& printer_name) OVERRIDE;
+
+ protected:
+ virtual ~PrintBackendWin() {}
};
bool PrintBackendWin::EnumeratePrinters(PrinterList* printer_list) {