| 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 if ($('sys-info-url')) { | 300 if ($('sys-info-url')) { |
| 301 // Opens a new window showing the current system info. | 301 // Opens a new window showing the current system info. |
| 302 $('sys-info-url').onclick = | 302 $('sys-info-url').onclick = |
| 303 windowOpener(SYSINFO_WINDOW_ID, 'chrome://system'); | 303 windowOpener(SYSINFO_WINDOW_ID, 'chrome://system'); |
| 304 } | 304 } |
| 305 if ($('histograms-url')) { | 305 if ($('histograms-url')) { |
| 306 // Opens a new window showing the histogram metrics. | 306 // Opens a new window showing the histogram metrics. |
| 307 $('histograms-url').onclick = | 307 $('histograms-url').onclick = |
| 308 windowOpener(STATS_WINDOW_ID, 'chrome://histograms'); | 308 windowOpener(STATS_WINDOW_ID, 'chrome://histograms'); |
| 309 } | 309 } |
| 310 // Make sure our focus starts on the description field. |
| 311 $('description-text').focus(); |
| 310 }); | 312 }); |
| 311 } | 313 } |
| 312 }); | 314 }); |
| 313 | 315 |
| 314 window.addEventListener('DOMContentLoaded', function() { | 316 window.addEventListener('DOMContentLoaded', function() { |
| 315 // Ready to receive the feedback object. | 317 // Ready to receive the feedback object. |
| 316 chrome.runtime.sendMessage({ready: true}); | 318 chrome.runtime.sendMessage({ready: true}); |
| 317 | 319 |
| 318 // Setup our event handlers. | 320 // Setup our event handlers. |
| 319 $('attach-file').addEventListener('change', onFileSelected); | 321 $('attach-file').addEventListener('change', onFileSelected); |
| 320 $('send-report-button').onclick = sendReport; | 322 $('send-report-button').onclick = sendReport; |
| 321 $('cancel-button').onclick = cancel; | 323 $('cancel-button').onclick = cancel; |
| 322 $('remove-attached-file').onclick = clearAttachedFile; | 324 $('remove-attached-file').onclick = clearAttachedFile; |
| 323 <if expr="chromeos"> | 325 <if expr="chromeos"> |
| 324 $('performance-info-checkbox').addEventListener( | 326 $('performance-info-checkbox').addEventListener( |
| 325 'change', performanceFeedbackChanged); | 327 'change', performanceFeedbackChanged); |
| 326 </if> | 328 </if> |
| 327 }); | 329 }); |
| 328 } | 330 } |
| 329 | 331 |
| 330 initialize(); | 332 initialize(); |
| OLD | NEW |