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

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

Issue 2840593003: Revert of Re-enable Cloud printers for ChromeOS kiosks. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | chrome/test/data/webui/print_preview_destination_search_test.js » ('j') | 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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 /** 578 /**
579 * Handler for {@code print_preview.DestinationListItem.EventType. 579 * Handler for {@code print_preview.DestinationListItem.EventType.
580 * CONFIGURE_REQUEST} event, which is called to check a destination list 580 * CONFIGURE_REQUEST} event, which is called to check a destination list
581 * item needs to be setup on Chrome OS before being selected. Note we do not 581 * item needs to be setup on Chrome OS before being selected. Note we do not
582 * allow configuring more than one destination at the same time. 582 * allow configuring more than one destination at the same time.
583 * @param {!CustomEvent} event Contains the destination needs to be setup. 583 * @param {!CustomEvent} event Contains the destination needs to be setup.
584 * @private 584 * @private
585 */ 585 */
586 onDestinationConfigureRequest_: function(event) { 586 onDestinationConfigureRequest_: function(event) {
587 var destination = event.detail.destination; 587 var destination = event.detail.destination;
588 // Cloud Print Device printers are stored in the local list 588 var destinationItem = destination.isLocal ?
589 // crbug.com/713831. 589 this.localList_.getDestinationItem(destination.id) :
590 // TODO(crbug.com/416701): Upon resolution, update this. 590 this.cloudList_.getDestinationItem(destination.id);
591 var destinationItem =
592 (destination.isLocal ||
593 destination.origin == print_preview.Destination.Origin.DEVICE) ?
594 this.localList_.getDestinationItem(destination.id) :
595 this.cloudList_.getDestinationItem(destination.id);
596 assert(destinationItem != null, 591 assert(destinationItem != null,
597 'User does not select a valid destination item.'); 592 'User does not select a valid destination item.');
598 593
599 // Another printer setup is in process or the printer doesn't need to be 594 // Another printer setup is in process or the printer doesn't need to be
600 // set up. Reject the setup request directly. 595 // set up. Reject the setup request directly.
601 if (this.destinationInConfiguring_ != null || 596 if (this.destinationInConfiguring_ != null ||
602 destination.origin != print_preview.Destination.Origin.CROS || 597 destination.origin != print_preview.Destination.Origin.CROS ||
603 destination.capabilities != null) { 598 destination.capabilities != null) {
604 destinationItem.onConfigureRequestRejected( 599 destinationItem.onConfigureRequestRejected(
605 this.destinationInConfiguring_ != null); 600 this.destinationInConfiguring_ != null);
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 onWindowResize_: function() { 830 onWindowResize_: function() {
836 this.reflowLists_(); 831 this.reflowLists_();
837 } 832 }
838 }; 833 };
839 834
840 // Export 835 // Export
841 return { 836 return {
842 DestinationSearch: DestinationSearch 837 DestinationSearch: DestinationSearch
843 }; 838 };
844 }); 839 });
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/webui/print_preview_destination_search_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698