Index: chrome/renderer/resources/neterror.js |
diff --git a/chrome/renderer/resources/neterror.js b/chrome/renderer/resources/neterror.js |
index 6f1e60198071553bf9890c4d39adb4a41bdee403..d1f4c5fe3518ff408e4543ba942298d4a4e8b4fc 100644 |
--- a/chrome/renderer/resources/neterror.js |
+++ b/chrome/renderer/resources/neterror.js |
@@ -60,13 +60,38 @@ function search(baseSearchUrl) { |
return false; |
} |
+// Implements button clicks. This function is needed during the transition |
+// between implementing these in trunk chromium and implementing them in |
+// iOS. |
+function reloadButtonClick(url) { |
+ if (window.errorPageController) { |
+ errorPageController.reloadButtonClick(); |
+ } else { |
+ location = url; |
+ } |
+} |
+ |
+function loadStaleButtonClick() { |
+ if (window.errorPageController) { |
+ errorPageController.loadStaleButtonClick(); |
+ } |
jar (doing other things)
2014/04/21 23:48:19
nit: No need for curlies (per style used in this f
Randy Smith (Not in Mondays)
2014/04/22 20:40:02
Done.
|
+} |
+ |
+function moreButtonClick() { |
+ if (window.errorPageController) { |
+ errorPageController.moreButtonClick(); |
+ } |
+} |
+ |
<if expr="is_macosx or is_ios or is_linux or is_android"> |
// Re-orders buttons. Used on Mac, Linux, and Android, where reload should go |
// on the right. |
function swapButtonOrder() { |
- reloadButton = document.getElementById('reload-button'); |
- moreLessButton = document.getElementById('more-less-button'); |
+ var reloadButton = document.getElementById('reload-button'); |
+ var moreLessButton = document.getElementById('more-less-button'); |
+ var staleLoadButton = document.getElementById('stale-load-button'); |
reloadButton.parentNode.insertBefore(moreLessButton, reloadButton); |
+ reloadButton.parentNode.insertBefore(staleLoadButton, reloadButton) |
} |
document.addEventListener("DOMContentLoaded", swapButtonOrder); |
</if> |