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 /** | 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 Loading... |
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 }); |
OLD | NEW |