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

Side by Side Diff: chrome/browser/resources/offline_pages/offline_internals.js

Issue 2103383003: Fix chrome://offline-internal page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated type declaration Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 cr.define('offlineInternals', function() { 5 cr.define('offlineInternals', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** @type {!Array<OfflinePage>} */ 8 /** @type {!Array<OfflinePage>} */
9 var offlinePages = []; 9 var offlinePages = [];
10 10
11 /** @type {!Array<SavePageRequest>} */ 11 /** @type {!Array<SavePageRequest>} */
12 var savePageRequests = []; 12 var savePageRequests = [];
13 13
14 /** @type {offlineInternals.OfflineInternalsBrowserProxy} */ 14 /** @type {!offlineInternals.OfflineInternalsBrowserProxy} */
15 var browserProxy_; 15 var browserProxy_ =
16 offlineInternals.OfflineInternalsBrowserProxyImpl.getInstance();
16 17
17 /** 18 /**
18 * Fill stored pages table. 19 * Fill stored pages table.
19 * @param {!Array<OfflinePage>} pages An array object representing 20 * @param {!Array<OfflinePage>} pages An array object representing
20 * stored offline pages. 21 * stored offline pages.
21 */ 22 */
22 function fillStoredPages(pages) { 23 function fillStoredPages(pages) {
23 var storedPagesTable = $('stored-pages'); 24 var storedPagesTable = $('stored-pages');
24 storedPagesTable.textContent = ''; 25 storedPagesTable.textContent = '';
25 26
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 $('download').onclick = download; 175 $('download').onclick = download;
175 $('log-model-on').onclick = 176 $('log-model-on').onclick =
176 browserProxy_.setRecordPageModel.bind(browserProxy_, true); 177 browserProxy_.setRecordPageModel.bind(browserProxy_, true);
177 $('log-model-off').onclick = 178 $('log-model-off').onclick =
178 browserProxy_.setRecordPageModel.bind(browserProxy_, false); 179 browserProxy_.setRecordPageModel.bind(browserProxy_, false);
179 $('log-request-on').onclick = 180 $('log-request-on').onclick =
180 browserProxy_.setRecordRequestQueue.bind(browserProxy_, true); 181 browserProxy_.setRecordRequestQueue.bind(browserProxy_, true);
181 $('log-request-off').onclick = 182 $('log-request-off').onclick =
182 browserProxy_.setRecordRequestQueue.bind(browserProxy_, false); 183 browserProxy_.setRecordRequestQueue.bind(browserProxy_, false);
183 $('refresh-logs').onclick = refreshLog; 184 $('refresh-logs').onclick = refreshLog;
184 browserProxy_ =
185 offlineInternals.OfflineInternalsBrowserProxyImpl.getInstance();
186 refreshAll(); 185 refreshAll();
187 } 186 }
188 187
189 // Return an object with all of the exports. 188 // Return an object with all of the exports.
190 return { 189 return {
191 initialize: initialize, 190 initialize: initialize,
192 }; 191 };
193 }); 192 });
194 193
195 document.addEventListener('DOMContentLoaded', offlineInternals.initialize); 194 document.addEventListener('DOMContentLoaded', offlineInternals.initialize);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698