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

Side by Side Diff: chrome/browser/resources/print_preview/data/destination_store.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * A data store that stores destinations and dispatches events when the data 9 * A data store that stores destinations and dispatches events when the data
10 * store changes. 10 * store changes.
(...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 } 1595 }
1596 } else { 1596 } else {
1597 if (destination) { 1597 if (destination) {
1598 // In case there were multiple capabilities request for this local 1598 // In case there were multiple capabilities request for this local
1599 // destination, just ignore the later ones. 1599 // destination, just ignore the later ones.
1600 if (destination.capabilities != null) { 1600 if (destination.capabilities != null) {
1601 return; 1601 return;
1602 } 1602 }
1603 destination.capabilities = capabilities; 1603 destination.capabilities = capabilities;
1604 } else { 1604 } else {
1605 var isEnterprisePrinter = event.settingsInfo['cupsEnterprisePrinter'];
1605 destination = print_preview.LocalDestinationParser.parse( 1606 destination = print_preview.LocalDestinationParser.parse(
1606 {deviceName: destinationId, 1607 {deviceName: destinationId,
1607 printerName: printerName, 1608 printerName: printerName,
1609 cupsEnterprisePrinter: isEnterprisePrinter,
1608 printerDescription: printerDescription}); 1610 printerDescription: printerDescription});
1609 destination.capabilities = capabilities; 1611 destination.capabilities = capabilities;
1610 this.insertDestination_(destination); 1612 this.insertDestination_(destination);
1611 } 1613 }
1612 } 1614 }
1613 if (this.selectedDestination_ && 1615 if (this.selectedDestination_ &&
1614 this.selectedDestination_.id == destinationId) { 1616 this.selectedDestination_.id == destinationId) {
1615 cr.dispatchSimpleEvent( 1617 cr.dispatchSimpleEvent(
1616 this, 1618 this,
1617 DestinationStore.EventType.SELECTED_DESTINATION_CAPABILITIES_READY); 1619 DestinationStore.EventType.SELECTED_DESTINATION_CAPABILITIES_READY);
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1800 return this.getDestinationKey_( 1802 return this.getDestinationKey_(
1801 destination.origin, destination.id, destination.account); 1803 destination.origin, destination.id, destination.account);
1802 } 1804 }
1803 }; 1805 };
1804 1806
1805 // Export 1807 // Export
1806 return { 1808 return {
1807 DestinationStore: DestinationStore 1809 DestinationStore: DestinationStore
1808 }; 1810 };
1809 }); 1811 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698