OLD | NEW |
---|---|
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 /** Namespace that contains a method to parse local print destinations. */ | 8 /** Namespace that contains a method to parse local print destinations. */ |
9 function LocalDestinationParser() {}; | 9 function LocalDestinationParser() {}; |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 * @return {!print_preview.Destination} Parsed destination. | 75 * @return {!print_preview.Destination} Parsed destination. |
76 */ | 76 */ |
77 ExtensionDestinationParser.parse = function(destinationInfo) { | 77 ExtensionDestinationParser.parse = function(destinationInfo) { |
78 return new print_preview.Destination( | 78 return new print_preview.Destination( |
79 destinationInfo.id, | 79 destinationInfo.id, |
80 print_preview.Destination.Type.LOCAL, | 80 print_preview.Destination.Type.LOCAL, |
81 print_preview.Destination.Origin.EXTENSION, | 81 print_preview.Destination.Origin.EXTENSION, |
82 destinationInfo.name, | 82 destinationInfo.name, |
83 false /* isRecent */, | 83 false /* isRecent */, |
84 print_preview.Destination.ConnectionStatus.ONLINE, | 84 print_preview.Destination.ConnectionStatus.ONLINE, |
85 {description: destinationInfo.description || '', | 85 {extensionId: destinationInfo.extensionId, |
tbarzic
2015/03/05 23:50:59
with extension name being displayed as hint for pr
Aleksey Shlyapnikov
2015/03/06 00:27:39
Would it occur to anyone to search for the printer
tbarzic
2015/03/06 03:16:11
The point of showing extension name is not as much
| |
86 extensionId: destinationInfo.extensionId}); | 86 extensionName: destinationInfo.extensionName || ''}); |
87 }; | 87 }; |
88 | 88 |
89 // Export | 89 // Export |
90 return { | 90 return { |
91 LocalDestinationParser: LocalDestinationParser, | 91 LocalDestinationParser: LocalDestinationParser, |
92 PrivetDestinationParser: PrivetDestinationParser, | 92 PrivetDestinationParser: PrivetDestinationParser, |
93 ExtensionDestinationParser: ExtensionDestinationParser | 93 ExtensionDestinationParser: ExtensionDestinationParser |
94 }; | 94 }; |
95 }); | 95 }); |
OLD | NEW |