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

Side by Side Diff: chrome/browser/resources/print_preview/search/destination_search.js

Issue 14370003: Use device Robot Account to access Cloud Print. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/print_preview/print_preview.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * Component used for searching for a print destination. 9 * Component used for searching for a print destination.
10 * This is a modal dialog that allows the user to search and select a 10 * This is a modal dialog that allows the user to search and select a
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 * @private 277 * @private
278 */ 278 */
279 renderDestinations_: function() { 279 renderDestinations_: function() {
280 var recentDestinations = []; 280 var recentDestinations = [];
281 var localDestinations = []; 281 var localDestinations = [];
282 var cloudDestinations = []; 282 var cloudDestinations = [];
283 this.destinationStore_.destinations.forEach(function(destination) { 283 this.destinationStore_.destinations.forEach(function(destination) {
284 if (destination.isRecent) { 284 if (destination.isRecent) {
285 recentDestinations.push(destination); 285 recentDestinations.push(destination);
286 } 286 }
287 if (destination.isLocal) { 287 if (destination.isLocal ||
288 destination.origin == print_preview.Destination.Origin.DEVICE) {
288 localDestinations.push(destination); 289 localDestinations.push(destination);
289 } else { 290 } else {
290 cloudDestinations.push(destination); 291 cloudDestinations.push(destination);
291 } 292 }
292 }); 293 });
293 this.recentList_.updateDestinations(recentDestinations); 294 this.recentList_.updateDestinations(recentDestinations);
294 this.localList_.updateDestinations(localDestinations); 295 this.localList_.updateDestinations(localDestinations);
295 this.cloudList_.updateDestinations(cloudDestinations); 296 this.cloudList_.updateDestinations(cloudDestinations);
296 }, 297 },
297 298
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 onWindowResize_: function() { 496 onWindowResize_: function() {
496 this.reflowLists_(); 497 this.reflowLists_();
497 } 498 }
498 }; 499 };
499 500
500 // Export 501 // Export
501 return { 502 return {
502 DestinationSearch: DestinationSearch 503 DestinationSearch: DestinationSearch
503 }; 504 };
504 }); 505 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/print_preview/print_preview.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698