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 * Object used to measure usage statistics. | 9 * Object used to measure usage statistics. |
10 * @constructor | 10 * @constructor |
(...skipping 25 matching lines...) Expand all Loading... |
36 // Privet and cloud printers. | 36 // Privet and cloud printers. |
37 CLOUD_DUPLICATE_SELECTED: 6, | 37 CLOUD_DUPLICATE_SELECTED: 6, |
38 // Used when a user sees a register promo for a cloud print printer. | 38 // Used when a user sees a register promo for a cloud print printer. |
39 REGISTER_PROMO_SHOWN: 7, | 39 REGISTER_PROMO_SHOWN: 7, |
40 // Used when a user selects a register promo for a cloud print printer. | 40 // Used when a user selects a register promo for a cloud print printer. |
41 REGISTER_PROMO_SELECTED: 8, | 41 REGISTER_PROMO_SELECTED: 8, |
42 // User changed active account. | 42 // User changed active account. |
43 ACCOUNT_CHANGED: 9, | 43 ACCOUNT_CHANGED: 9, |
44 // User tried to log into another account. | 44 // User tried to log into another account. |
45 ADD_ACCOUNT_SELECTED: 10, | 45 ADD_ACCOUNT_SELECTED: 10, |
| 46 // Printer sharing invitation was shown to the user. |
| 47 INVITATION_AVAILABLE: 11, |
| 48 // User accepted printer sharing invitation. |
| 49 INVITATION_ACCEPTED: 12, |
| 50 // User rejected printer sharing invitation. |
| 51 INVITATION_REJECTED: 13, |
46 // Max value. | 52 // Max value. |
47 DESTINATION_SEARCH_MAX_BUCKET: 11 | 53 DESTINATION_SEARCH_MAX_BUCKET: 14 |
48 }; | 54 }; |
49 | 55 |
50 /** | 56 /** |
51 * Enumeration of buckets that a user can enter while using the Google Cloud | 57 * Enumeration of buckets that a user can enter while using the Google Cloud |
52 * Print promotion. | 58 * Print promotion. |
53 * @enum {number} | 59 * @enum {number} |
54 */ | 60 */ |
55 Metrics.GcpPromoBucket = { | 61 Metrics.GcpPromoBucket = { |
56 // Used when the Google Cloud Print promotion (shown above the PDF preview | 62 // Used when the Google Cloud Print promotion (shown above the PDF preview |
57 // plugin) is shown to the user. | 63 // plugin) is shown to the user. |
(...skipping 10 matching lines...) Expand all Loading... |
68 | 74 |
69 /** | 75 /** |
70 * Print settings UI usage metrics buckets. | 76 * Print settings UI usage metrics buckets. |
71 * @enum {number} | 77 * @enum {number} |
72 */ | 78 */ |
73 Metrics.PrintSettingsUiBucket = { | 79 Metrics.PrintSettingsUiBucket = { |
74 // Advanced settings dialog is shown. | 80 // Advanced settings dialog is shown. |
75 ADVANCED_SETTINGS_DIALOG_SHOWN: 0, | 81 ADVANCED_SETTINGS_DIALOG_SHOWN: 0, |
76 // Advanced settings dialog is closed without saving a selection. | 82 // Advanced settings dialog is closed without saving a selection. |
77 ADVANCED_SETTINGS_DIALOG_CANCELED: 1, | 83 ADVANCED_SETTINGS_DIALOG_CANCELED: 1, |
| 84 // 'More/less settings' expanded. |
| 85 MORE_SETTINGS_CLICKED: 2, |
| 86 // 'More/less settings' collapsed. |
| 87 LESS_SETTINGS_CLICKED: 3, |
| 88 // User printed with extra settings expanded. |
| 89 PRINT_WITH_SETTINGS_EXPANDED: 4, |
| 90 // User printed with extra settings collapsed. |
| 91 PRINT_WITH_SETTINGS_COLLAPSED: 5, |
78 // Max value. | 92 // Max value. |
79 PRINT_SETTINGS_UI_MAX_BUCKET: 2 | 93 PRINT_SETTINGS_UI_MAX_BUCKET: 6 |
80 }; | 94 }; |
81 | 95 |
82 /** | 96 /** |
83 * A context for recording a value in a specific UMA histogram. | 97 * A context for recording a value in a specific UMA histogram. |
84 * @param {string} histogram The name of the histogram to be recorded in. | 98 * @param {string} histogram The name of the histogram to be recorded in. |
85 * @param {number} maxBucket The max value for the last histogram bucket. | 99 * @param {number} maxBucket The max value for the last histogram bucket. |
86 * @constructor | 100 * @constructor |
87 */ | 101 */ |
88 function MetricsContext(histogram, maxBucket) { | 102 function MetricsContext(histogram, maxBucket) { |
89 /** @private {string} */ | 103 /** @private {string} */ |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 170 |
157 // Export | 171 // Export |
158 return { | 172 return { |
159 Metrics: Metrics, | 173 Metrics: Metrics, |
160 MetricsContext: MetricsContext, | 174 MetricsContext: MetricsContext, |
161 DestinationSearchMetricsContext: DestinationSearchMetricsContext, | 175 DestinationSearchMetricsContext: DestinationSearchMetricsContext, |
162 GcpPromoMetricsContext: GcpPromoMetricsContext, | 176 GcpPromoMetricsContext: GcpPromoMetricsContext, |
163 PrintSettingsUiMetricsContext: PrintSettingsUiMetricsContext | 177 PrintSettingsUiMetricsContext: PrintSettingsUiMetricsContext |
164 }; | 178 }; |
165 }); | 179 }); |
OLD | NEW |