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

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

Issue 189623004: UMA Histograms for Register Promos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
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 // TODO(rltoscano): Move data/* into print_preview.data namespace 5 // TODO(rltoscano): Move data/* into print_preview.data namespace
6 6
7 var localStrings = new LocalStrings(templateData); 7 var localStrings = new LocalStrings(templateData);
8 8
9 <include src="component.js"/> 9 <include src="component.js"/>
10 10
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 */ 697 */
698 onCancelButtonClick_: function() { 698 onCancelButtonClick_: function() {
699 this.close_(); 699 this.close_();
700 }, 700 },
701 701
702 /** 702 /**
703 * Called when the register promo for Cloud Print is clicked. 703 * Called when the register promo for Cloud Print is clicked.
704 * @private 704 * @private
705 */ 705 */
706 onCloudPrintRegisterPromoClick_: function(e) { 706 onCloudPrintRegisterPromoClick_: function(e) {
707 this.metrics_.incrementDestinationSearchBucket(
708 print_preview.Metrics.DestinationSearchBucket.REGISTER_PROMO_SELECTED);
707 var devicesUrl = 'chrome://devices/register?id=' + e.destination.id; 709 var devicesUrl = 'chrome://devices/register?id=' + e.destination.id;
708 this.nativeLayer_.startForceOpenNewTab(devicesUrl); 710 this.nativeLayer_.startForceOpenNewTab(devicesUrl);
709 this.destinationStore_.waitForRegister(e.destination.id); 711 this.destinationStore_.waitForRegister(e.destination.id);
710 }, 712 },
711 713
712 /** 714 /**
713 * Consume escape key presses and ctrl + shift + p. Delegate everything else 715 * Consume escape key presses and ctrl + shift + p. Delegate everything else
714 * to the preview area. 716 * to the preview area.
715 * @param {KeyboardEvent} e The keyboard event. 717 * @param {KeyboardEvent} e The keyboard event.
716 * @private 718 * @private
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 <include src="search/recent_destination_list.js"/> 976 <include src="search/recent_destination_list.js"/>
975 <include src="search/destination_list_item.js"/> 977 <include src="search/destination_list_item.js"/>
976 <include src="search/destination_search.js"/> 978 <include src="search/destination_search.js"/>
977 <include src="search/search_box.js"/> 979 <include src="search/search_box.js"/>
978 <include src="search/fedex_tos.js"/> 980 <include src="search/fedex_tos.js"/>
979 981
980 window.addEventListener('DOMContentLoaded', function() { 982 window.addEventListener('DOMContentLoaded', function() {
981 printPreview = new print_preview.PrintPreview(); 983 printPreview = new print_preview.PrintPreview();
982 printPreview.initialize(); 984 printPreview.initialize();
983 }); 985 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/print_preview/metrics.js ('k') | chrome/browser/resources/print_preview/search/destination_search.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698