| 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 /** | 5 /** |
| 6 * @type {string} | 6 * @type {string} |
| 7 * @const | 7 * @const |
| 8 */ | 8 */ |
| 9 var SRT_DOWNLOAD_PAGE = 'https://www.google.com/chrome/cleanup-tool/'; | 9 var SRT_DOWNLOAD_PAGE = 'https://www.google.com/chrome/cleanup-tool/'; |
| 10 | 10 |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 chrome.app.window.current().show(); | 337 chrome.app.window.current().show(); |
| 338 | 338 |
| 339 var screenshotDataUrl = screenshotCanvas.toDataURL('image/png'); | 339 var screenshotDataUrl = screenshotCanvas.toDataURL('image/png'); |
| 340 $('screenshot-image').src = screenshotDataUrl; | 340 $('screenshot-image').src = screenshotDataUrl; |
| 341 $('screenshot-image').classList.toggle('wide-screen', | 341 $('screenshot-image').classList.toggle('wide-screen', |
| 342 $('screenshot-image').width > MAX_SCREENSHOT_WIDTH); | 342 $('screenshot-image').width > MAX_SCREENSHOT_WIDTH); |
| 343 feedbackInfo.screenshot = dataUrlToBlob(screenshotDataUrl); | 343 feedbackInfo.screenshot = dataUrlToBlob(screenshotDataUrl); |
| 344 }); | 344 }); |
| 345 | 345 |
| 346 chrome.feedbackPrivate.getUserEmail(function(email) { | 346 chrome.feedbackPrivate.getUserEmail(function(email) { |
| 347 // Never add an empty option. |
| 348 if (!email) |
| 349 return; |
| 347 var optionElement = document.createElement('option'); | 350 var optionElement = document.createElement('option'); |
| 348 optionElement.value = email; | 351 optionElement.value = email; |
| 349 optionElement.text = email; | 352 optionElement.text = email; |
| 350 optionElement.selected = true; | 353 optionElement.selected = true; |
| 351 // Make sure the "Report anonymously" option comes last. | 354 // Make sure the "Report anonymously" option comes last. |
| 352 $('user-email-drop-down').insertBefore(optionElement, | 355 $('user-email-drop-down').insertBefore(optionElement, |
| 353 $('anonymous-user-option')); | 356 $('anonymous-user-option')); |
| 354 }); | 357 }); |
| 355 | 358 |
| 356 // Initiate getting the system info. | 359 // Initiate getting the system info. |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 $('cancel-button').onclick = cancel; | 447 $('cancel-button').onclick = cancel; |
| 445 $('remove-attached-file').onclick = clearAttachedFile; | 448 $('remove-attached-file').onclick = clearAttachedFile; |
| 446 // <if expr="chromeos"> | 449 // <if expr="chromeos"> |
| 447 $('performance-info-checkbox').addEventListener( | 450 $('performance-info-checkbox').addEventListener( |
| 448 'change', performanceFeedbackChanged); | 451 'change', performanceFeedbackChanged); |
| 449 // </if> | 452 // </if> |
| 450 }); | 453 }); |
| 451 } | 454 } |
| 452 | 455 |
| 453 initialize(); | 456 initialize(); |
| OLD | NEW |