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

Unified Diff: chrome/browser/resources/print_preview/data/destination.js

Issue 2618313004: [CUPS] Implement the enterprise icon for printers in Print Preview Dialog. (Closed)
Patch Set: Address dpapad@'s comments. Created 3 years, 11 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: chrome/browser/resources/print_preview/data/destination.js
diff --git a/chrome/browser/resources/print_preview/data/destination.js b/chrome/browser/resources/print_preview/data/destination.js
index c4ae78e4db36e9b98176fb370d8bdff28a489f99..8eaa24f535f0cf0be1f98329b0d0bc9e8345f7fb 100644
--- a/chrome/browser/resources/print_preview/data/destination.js
+++ b/chrome/browser/resources/print_preview/data/destination.js
@@ -50,6 +50,7 @@ cr.define('print_preview', function() {
* Connection status of the print destination.
* @param {{tags: (Array<string>|undefined),
* isOwned: (boolean|undefined),
+ * isEnterprisePrinter: (boolean|undefined),
* account: (string|undefined),
* lastAccessTime: (number|undefined),
* isTosAccepted: (boolean|undefined),
@@ -113,6 +114,13 @@ cr.define('print_preview', function() {
this.isOwned_ = (opt_params && opt_params.isOwned) || false;
/**
+ * Whether the destination is an enterprise policy controlled printer.
+ * @private {boolean}
+ */
+ this.isEnterprisePrinter_ =
+ (opt_params && opt_params.isEnterprisePrinter) || false;
+
+ /**
* Account this destination is registered for, if known.
* @private {string}
*/
@@ -274,7 +282,8 @@ cr.define('print_preview', function() {
THIRD_PARTY: 'images/third_party.png',
PDF: 'images/pdf.png',
DOCS: 'images/google_doc.png',
- FEDEX: 'images/third_party_fedex.png'
+ FEDEX: 'images/third_party_fedex.png',
+ ENTERPRISE: 'images/business.svg'
};
Destination.prototype = {
@@ -489,6 +498,9 @@ cr.define('print_preview', function() {
if (this.id_ == Destination.GooglePromotedId.SAVE_AS_PDF) {
return Destination.IconUrl_.PDF;
}
+ if (this.isEnterprisePrinter) {
+ return Destination.IconUrl_.ENTERPRISE;
+ }
if (this.isLocal) {
return Destination.IconUrl_.LOCAL;
}
@@ -558,7 +570,15 @@ cr.define('print_preview', function() {
*/
get isProvisional() {
return this.provisionalType_ != Destination.ProvisionalType.NONE;
- }
+ },
+
+ /**
+ * Whether the printer is enterprise policy controlled printer.
+ * @return {boolean}
+ */
+ get isEnterprisePrinter() {
+ return this.isEnterprisePrinter_;
+ },
};
// Export

Powered by Google App Engine
This is Rietveld 408576698