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

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

Issue 601573002: Add UMA stats for new Print Preview UI elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 /** 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 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 print_preview.Metrics.DestinationSearchBucket.ADD_ACCOUNT_SELECTED); 654 print_preview.Metrics.DestinationSearchBucket.ADD_ACCOUNT_SELECTED);
655 } 655 }
656 }, 656 },
657 657
658 /** 658 /**
659 * Called when the printer sharing invitation Accept/Reject button is 659 * Called when the printer sharing invitation Accept/Reject button is
660 * clicked. 660 * clicked.
661 * @private 661 * @private
662 */ 662 */
663 onInvitationProcessButtonClick_: function(accept) { 663 onInvitationProcessButtonClick_: function(accept) {
664 this.metrics_.record(accept ?
665 print_preview.Metrics.DestinationSearchBucket.INVITATION_ACCEPTED :
666 print_preview.Metrics.DestinationSearchBucket.INVITATION_REJECTED);
664 this.invitationStore_.processInvitation(this.invitation_, accept); 667 this.invitationStore_.processInvitation(this.invitation_, accept);
665 this.updateInvitations_(); 668 this.updateInvitations_();
666 }, 669 },
667 670
668 /** 671 /**
669 * Called when the close button on the cloud print promo is clicked. Hides 672 * Called when the close button on the cloud print promo is clicked. Hides
670 * the promo. 673 * the promo.
671 * @private 674 * @private
672 */ 675 */
673 onCloudprintPromoCloseButtonClick_: function() { 676 onCloudprintPromoCloseButtonClick_: function() {
674 setIsVisible(this.getChildElement('.cloudprint-promo'), false); 677 setIsVisible(this.getChildElement('.cloudprint-promo'), false);
675 }, 678 },
676 679
677 /** 680 /**
678 * Called when the window is resized. Reflows layout of destination lists. 681 * Called when the window is resized. Reflows layout of destination lists.
679 * @private 682 * @private
680 */ 683 */
681 onWindowResize_: function() { 684 onWindowResize_: function() {
682 this.reflowLists_(); 685 this.reflowLists_();
683 } 686 }
684 }; 687 };
685 688
686 // Export 689 // Export
687 return { 690 return {
688 DestinationSearch: DestinationSearch 691 DestinationSearch: DestinationSearch
689 }; 692 };
690 }); 693 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698