| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 /** @type {string} | 5 /** @type {string} |
| 6 * @const | 6 * @const |
| 7 */ | 7 */ |
| 8 var FEEDBACK_LANDING_PAGE = | 8 var FEEDBACK_LANDING_PAGE = |
| 9 'https://www.google.com/support/chrome/go/feedback_confirmation'; | 9 'https://www.google.com/support/chrome/go/feedback_confirmation'; |
| 10 /** @type {number} | 10 /** @type {number} |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 if ($('sys-info-url')) { | 308 if ($('sys-info-url')) { |
| 309 // Opens a new window showing the current system info. | 309 // Opens a new window showing the current system info. |
| 310 $('sys-info-url').onclick = | 310 $('sys-info-url').onclick = |
| 311 windowOpener(SYSINFO_WINDOW_ID, 'chrome://system'); | 311 windowOpener(SYSINFO_WINDOW_ID, 'chrome://system'); |
| 312 } | 312 } |
| 313 if ($('histograms-url')) { | 313 if ($('histograms-url')) { |
| 314 // Opens a new window showing the histogram metrics. | 314 // Opens a new window showing the histogram metrics. |
| 315 $('histograms-url').onclick = | 315 $('histograms-url').onclick = |
| 316 windowOpener(STATS_WINDOW_ID, 'chrome://histograms'); | 316 windowOpener(STATS_WINDOW_ID, 'chrome://histograms'); |
| 317 } | 317 } |
| 318 // Make sure our focus starts on the description field. |
| 319 $('description-text').focus(); |
| 318 }); | 320 }); |
| 319 } | 321 } |
| 320 }); | 322 }); |
| 321 | 323 |
| 322 window.addEventListener('DOMContentLoaded', function() { | 324 window.addEventListener('DOMContentLoaded', function() { |
| 323 // TODO(rkc): Remove logging once crbug.com/284662 is closed. | 325 // TODO(rkc): Remove logging once crbug.com/284662 is closed. |
| 324 console.log('FEEDBACK_DEBUG: feedback.js: DOMContentLoaded'); | 326 console.log('FEEDBACK_DEBUG: feedback.js: DOMContentLoaded'); |
| 325 // Ready to receive the feedback object. | 327 // Ready to receive the feedback object. |
| 326 chrome.runtime.sendMessage({ready: true}); | 328 chrome.runtime.sendMessage({ready: true}); |
| 327 | 329 |
| 328 // Setup our event handlers. | 330 // Setup our event handlers. |
| 329 $('attach-file').addEventListener('change', onFileSelected); | 331 $('attach-file').addEventListener('change', onFileSelected); |
| 330 $('send-report-button').onclick = sendReport; | 332 $('send-report-button').onclick = sendReport; |
| 331 $('cancel-button').onclick = cancel; | 333 $('cancel-button').onclick = cancel; |
| 332 $('remove-attached-file').onclick = clearAttachedFile; | 334 $('remove-attached-file').onclick = clearAttachedFile; |
| 333 <if expr="chromeos"> | 335 <if expr="chromeos"> |
| 334 $('performance-info-checkbox').addEventListener( | 336 $('performance-info-checkbox').addEventListener( |
| 335 'change', performanceFeedbackChanged); | 337 'change', performanceFeedbackChanged); |
| 336 </if> | 338 </if> |
| 337 }); | 339 }); |
| 338 } | 340 } |
| 339 | 341 |
| 340 initialize(); | 342 initialize(); |
| OLD | NEW |