Chromium Code Reviews| Index: chrome/browser/resources/print_preview/print_preview.js |
| diff --git a/chrome/browser/resources/print_preview/print_preview.js b/chrome/browser/resources/print_preview/print_preview.js |
| index 47c455d1bbe3752074401d25d87bb44b1681269b..9fef030ce6c1487a468874641012a739ebafff00 100644 |
| --- a/chrome/browser/resources/print_preview/print_preview.js |
| +++ b/chrome/browser/resources/print_preview/print_preview.js |
| @@ -82,7 +82,6 @@ function onLoad() { |
| cr.enablePlatformSpecificCSSRules(); |
| if (!checkCompatiblePluginExists()) { |
| - disableInputElementsInSidebar(); |
| displayErrorMessageWithButton(localStrings.getString('noPlugin'), |
| localStrings.getString('launchNativeDialog'), |
| launchNativePrintDialog); |
| @@ -162,11 +161,22 @@ function launchNativePrintDialog() { |
| /** |
| * Disables the controls which need the initiator tab to generate preview |
| + * data. This function is called when the initiator tab has crashed. |
| + * @param {string} initiatorTabURL The URL of the initiator tab. |
| + */ |
| +function onInitiatorTabCrashed(initiatorTabURL) { |
| + displayErrorMessageWithButton( |
| + localStrings.getString('initiatorTabCrashed'), |
| + localStrings.getString('reopenPage'), |
| + function() { chrome.send('reloadCrashedInitiatorTab'); }); |
| +} |
| + |
| +/** |
| + * Disables the controls which need the initiator tab to generate preview |
| * data. This function is called when the initiator tab is closed. |
| * @param {string} initiatorTabURL The URL of the initiator tab. |
| */ |
| function onInitiatorTabClosed(initiatorTabURL) { |
| - disableInputElementsInSidebar(); |
| displayErrorMessageWithButton( |
| localStrings.getString('initiatorTabClosed'), |
| localStrings.getString('reopenPage'), |
| @@ -750,6 +760,8 @@ function displayErrorMessage(errorMessage) { |
| */ |
| function displayErrorMessageWithButton( |
| errorMessage, buttonText, buttonListener) { |
| + disableInputElementsInSidebar(); |
|
dpapad
2011/08/10 22:37:02
Should disableInputElementsInSidebar() be within d
kmadhusu
2011/08/15 18:12:49
Done.
|
| + |
| var errorButton = $('error-button'); |
| errorButton.disabled = false; |
| errorButton.textContent = buttonText; |