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

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

Issue 1144983002: Introduce concept of provisional destinations to print preview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 6 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 /** 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 {description: destinationInfo.description || '',
86 extensionId: destinationInfo.extensionId, 86 extensionId: destinationInfo.extensionId,
87 extensionName: destinationInfo.extensionName || ''}); 87 extensionName: destinationInfo.extensionName || '',
88 usbId: destinationInfo.usbDevice});
88 }; 89 };
89 90
90 // Export 91 // Export
91 return { 92 return {
92 LocalDestinationParser: LocalDestinationParser, 93 LocalDestinationParser: LocalDestinationParser,
93 PrivetDestinationParser: PrivetDestinationParser, 94 PrivetDestinationParser: PrivetDestinationParser,
94 ExtensionDestinationParser: ExtensionDestinationParser 95 ExtensionDestinationParser: ExtensionDestinationParser
95 }; 96 };
96 }); 97 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698