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

Unified Diff: printing/backend/cups_ipp_util.h

Issue 2105463002: Create a new print backend for the updated CUPS APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix printing gyp file. Created 4 years, 5 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
Index: printing/backend/cups_ipp_util.h
diff --git a/printing/backend/cups_ipp_util.h b/printing/backend/cups_ipp_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..f8d4e852b304f75cca0b57a17a6a5ab2805df047
--- /dev/null
+++ b/printing/backend/cups_ipp_util.h
@@ -0,0 +1,40 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PRINTING_BACKEND_CUPS_IPP_UTIL_H_
+#define PRINTING_BACKEND_CUPS_IPP_UTIL_H_
+
+#include "base/strings/string_piece.h"
+#include "printing/backend/cups_printer.h"
+#include "printing/backend/print_backend.h"
+
+namespace printing {
+
+// Populates the color_model, bw_model, color_changeable, and color_default in
+// |printer_info| from |printer|.
+void ExtractColor(const CupsPrinter& printer,
Lei Zhang 2016/07/13 01:08:42 Why not just return the color, and let the caller
skau 2016/07/14 20:43:05 Laziness. I've fixed it so it's more useful.
+ PrinterSemanticCapsAndDefaults* printer_info);
+
+// Returns the default paper setting for |printer|.
+PrinterSemanticCapsAndDefaults::Paper DefaultPaper(const CupsPrinter& printer);
+
+// Populates papers and default_paper in |printer_info| from |printer|.
+void ExtractPaper(const CupsPrinter& printer,
+ PrinterSemanticCapsAndDefaults* printer_info);
+
+// Populates copies_capable in |printer_info| from |printer|.
+void ExtractCopies(const CupsPrinter& printer,
+ PrinterSemanticCapsAndDefaults* printer_info);
+
+// Populates collate_capable and collate_default in |printer_info| using
+// |printer|.
+void ExtractCollate(const CupsPrinter& printer,
+ PrinterSemanticCapsAndDefaults* printer_info);
+
+// Populates duplex_capable and duplex_default in |printer_info| from |printer|.
+void ExtractDuplex(const CupsPrinter& printer,
+ PrinterSemanticCapsAndDefaults* printer_info);
+} // namespace printing
+
+#endif // PRINTING_BACKEND_CUPS_IPP_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698