| OLD | NEW |
| 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 |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 if (counter == 0) { | 285 if (counter == 0) { |
| 286 browserProxy_.getRequestQueue().then(fillRequestQueue); | 286 browserProxy_.getRequestQueue().then(fillRequestQueue); |
| 287 } | 287 } |
| 288 } else { | 288 } else { |
| 289 $('save-url-state').textContent += | 289 $('save-url-state').textContent += |
| 290 saveUrls[i] + ' failed to be added to queue.\n'; | 290 saveUrls[i] + ' failed to be added to queue.\n'; |
| 291 } | 291 } |
| 292 }); | 292 }); |
| 293 } | 293 } |
| 294 }; | 294 }; |
| 295 $('schedule-nwake').onclick = function() { |
| 296 browserProxy_.scheduleNwake(); |
| 297 } |
| 298 $('cancel-nwake').onclick = function() { |
| 299 browserProxy_.cancelNwake(); |
| 300 } |
| 295 if (!incognito) | 301 if (!incognito) |
| 296 refreshAll(); | 302 refreshAll(); |
| 297 } | 303 } |
| 298 | 304 |
| 299 // Return an object with all of the exports. | 305 // Return an object with all of the exports. |
| 300 return { | 306 return { |
| 301 initialize: initialize, | 307 initialize: initialize, |
| 302 }; | 308 }; |
| 303 }); | 309 }); |
| 304 | 310 |
| 305 document.addEventListener('DOMContentLoaded', offlineInternals.initialize); | 311 document.addEventListener('DOMContentLoaded', offlineInternals.initialize); |
| OLD | NEW |