Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(744)

Side by Side Diff: chrome/renderer/resources/neterror.js

Issue 856643002: Viewing cached webpages while offline is not available on Chrome OS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 function toggleHelpBox() { 5 function toggleHelpBox() {
6 var helpBoxOuter = document.getElementById('help-box-outer'); 6 var helpBoxOuter = document.getElementById('help-box-outer');
7 helpBoxOuter.classList.toggle('hidden'); 7 helpBoxOuter.classList.toggle('hidden');
8 var detailsButton = document.getElementById('details-button'); 8 var detailsButton = document.getElementById('details-button');
9 if (helpBoxOuter.classList.contains('hidden')) 9 if (helpBoxOuter.classList.contains('hidden'))
10 detailsButton.innerText = detailsButton.detailsText; 10 detailsButton.innerText = detailsButton.detailsText;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } else { 124 } else {
125 buttons.classList.add('suggested-right'); 125 buttons.classList.add('suggested-right');
126 controlButtonDiv.insertBefore(secondaryButton, primaryButton); 126 controlButtonDiv.insertBefore(secondaryButton, primaryButton);
127 } 127 }
128 128
129 if (reloadButton.style.display == 'none' && 129 if (reloadButton.style.display == 'none' &&
130 staleLoadButton.style.display == 'none') { 130 staleLoadButton.style.display == 'none') {
131 detailsButton.classList.add('singular'); 131 detailsButton.classList.add('singular');
132 } 132 }
133 133
134 <if expr="not chromeos">
134 // Hide the details button if there are no details to show. 135 // Hide the details button if there are no details to show.
135 if (loadTimeData.valueExists('summary') && 136 if (loadTimeData.valueExists('summary') &&
136 !loadTimeData.getValue('summary').msg) { 137 !loadTimeData.getValue('summary').msg) {
137 detailsButton.style.display = 'none'; 138 detailsButton.style.display = 'none';
138 document.getElementById('help-box-outer').style.display = 'block'; 139 document.getElementById('help-box-outer').style.display = 'block';
139 } 140 }
141 </if>
afakhry 2015/01/22 22:27:23 To mimic the behavior of the old ChromeOS's offlin
afakhry 2015/01/23 01:35:46 @edwardjung, @arv: Can you please confirm that thi
afakhry 2015/01/23 01:42:01 A bit of context: ChromeOS used to use: - src/chro
edwardjung 2015/01/23 11:18:28 It makes sense to consolidate. Is src/chrome/rende
edwardjung 2015/01/23 11:18:28 As long as there will always be something in the d
afakhry 2015/01/23 17:49:25 The diagnose button is only specific to ChromeOS.
140 142
141 // Show control buttons. 143 // Show control buttons.
142 if (loadTimeData.valueExists('reloadButton') && 144 if (loadTimeData.valueExists('reloadButton') &&
143 loadTimeData.getValue('reloadButton').msg || 145 loadTimeData.getValue('reloadButton').msg ||
144 loadTimeData.valueExists('staleLoadButton') && 146 loadTimeData.valueExists('staleLoadButton') &&
145 loadTimeData.getValue('staleLoadButton').msg) { 147 loadTimeData.getValue('staleLoadButton').msg) {
146 controlButtonDiv.hidden = false; 148 controlButtonDiv.hidden = false;
147 } 149 }
148 150
149 // Add a main message paragraph. 151 // Add a main message paragraph.
150 if (loadTimeData.valueExists('primaryParagraph')) { 152 if (loadTimeData.valueExists('primaryParagraph')) {
151 var p = document.querySelector('#main-message p'); 153 var p = document.querySelector('#main-message p');
152 p.innerHTML = loadTimeData.getString('primaryParagraph'); 154 p.innerHTML = loadTimeData.getString('primaryParagraph');
153 p.hidden = false; 155 p.hidden = false;
154 } 156 }
155 } 157 }
156 158
157 document.addEventListener('DOMContentLoaded', onDocumentLoad); 159 document.addEventListener('DOMContentLoaded', onDocumentLoad);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698