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

Side by Side Diff: chrome/browser/resources/print_preview/data/destination_store.js

Issue 59843010: Print to Privet local printers (PDF only) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 * Called when capabilities for a privet printer are set. 673 * Called when capabilities for a privet printer are set.
674 * @param {object} event Contains the capabilities and printer ID. 674 * @param {object} event Contains the capabilities and printer ID.
675 * @private 675 * @private
676 */ 676 */
677 onPrivetCapabilitiesSet_: function(event) { 677 onPrivetCapabilitiesSet_: function(event) {
678 var destinationId = event.printerId; 678 var destinationId = event.printerId;
679 var dest = print_preview.PrivetDestinationParser.parse(event.printer); 679 var dest = print_preview.PrivetDestinationParser.parse(event.printer);
680 dest.capabilities = event.capabilities; 680 dest.capabilities = event.capabilities;
681 681
682 this.updateDestination(dest); 682 this.updateDestination(dest);
683 if (this.selectedDestination_ == dest) { 683 if (this.selectedDestination_.isPrivet &&
684 this.selectedDestination_.id == dest.id) {
684 cr.dispatchSimpleEvent( 685 cr.dispatchSimpleEvent(
685 this, 686 this,
686 DestinationStore.EventType.SELECTED_DESTINATION_CAPABILITIES_READY); 687 DestinationStore.EventType.SELECTED_DESTINATION_CAPABILITIES_READY);
687 } 688 }
688 }, 689 },
689 690
690 /** 691 /**
691 * Called when the search for Privet printers is done. 692 * Called when the search for Privet printers is done.
692 * @private 693 * @private
693 */ 694 */
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 return id == this.initialDestinationId_ && 756 return id == this.initialDestinationId_ &&
756 origin == this.initialDestinationOrigin_; 757 origin == this.initialDestinationOrigin_;
757 } 758 }
758 }; 759 };
759 760
760 // Export 761 // Export
761 return { 762 return {
762 DestinationStore: DestinationStore 763 DestinationStore: DestinationStore
763 }; 764 };
764 }); 765 });
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/resources/print_preview/data/print_ticket_store.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698