| 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..d27c65f58a8384b4ef2a1f0e96dc2630d86f095d
|
| --- /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' is the template of the Add Printer dialog. */
|
| +Polymer({
|
| + is: 'add-printer-dialog',
|
| +
|
| + /** @private */
|
| + attached: function() {
|
| + this.$.dialog.showModal();
|
| + },
|
| +
|
| + close: function() {
|
| + this.$.dialog.close();
|
| + },
|
| +});
|
|
|