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

Unified Diff: chrome/browser/resources/settings/printing_page/cups_add_printer_dialog_util.js

Issue 2281353002: [CUPS] Implement the Add Printer dialogs. (Closed)
Patch Set: Created 4 years, 4 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/settings/printing_page/cups_add_printer_dialog_util.js
diff --git a/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog_util.js b/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog_util.js
new file mode 100644
index 0000000000000000000000000000000000000000..7efe50f1019284675bb92383bbb69116b4a8ba99
--- /dev/null
+++ b/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog_util.js
@@ -0,0 +1,44 @@
+// 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.
+
+/** 'add-printers-list' is the list of discovered printers. */
+Polymer({
+ is: 'add-printer-list',
+
+ properties: {
+ /** @type {!Array<!CupsPrinterInfo>} */
+ printers: {
+ type: Array,
+ notify: true,
+ },
+
+ /** @type {!CupsPrinterInfo} */
+ selectedPrinter: {
+ type: Object,
+ notify: true,
+ },
+ },
+
+ /**
+ * @param {{model:Object}} event
+ * @private
+ */
+ onSelect_: function(event) {
+ this.selectedPrinter = event.model.item;
+ },
+});
+
+/** 'add-printer-dialog-template' is the template of the Add Printer dialog. */
+Polymer({
+ is: 'add-printer-dialog-template',
michaelpg 2016/08/29 17:10:33 please find another name -- <template> has a very
xdai1 2016/08/29 18:45:45 Done.
+
+ /** @private */
+ attached: function() {
+ this.$$('#dialog').showModal();
michaelpg 2016/08/29 17:10:33 this.$.dialog
xdai1 2016/08/29 18:45:45 Done.
+ },
+
+ close: function() {
+ this.$$('#dialog').close();
michaelpg 2016/08/29 17:10:33 same
xdai1 2016/08/29 18:45:45 Done.
+ },
+});

Powered by Google App Engine
This is Rietveld 408576698