| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // require cr.js | 5 // require cr.js |
| 6 // require cr/event_target.js | 6 // require cr/event_target.js |
| 7 // require cr/ui.js | 7 // require cr/ui.js |
| 8 // require cr/ui/tabs.js | 8 // require cr/ui/tabs.js |
| 9 // require cr/ui/tree.js | 9 // require cr/ui/tree.js |
| 10 // require cr/util.js | 10 // require cr/util.js |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 destination[i] = source[i]; | 35 destination[i] = source[i]; |
| 36 return destination; | 36 return destination; |
| 37 } | 37 } |
| 38 | 38 |
| 39 /** | 39 /** |
| 40 * Apply localization to |element| with i18n_template.js if available. | 40 * Apply localization to |element| with i18n_template.js if available. |
| 41 * @param {Element} element Element to be localized. | 41 * @param {Element} element Element to be localized. |
| 42 * @private | 42 * @private |
| 43 */ | 43 */ |
| 44 function localize_(element) { | 44 function localize_(element) { |
| 45 if (i18nTemplate && loadTimeData) | 45 if (window.i18nTemplate && window.loadTimeData) |
| 46 i18nTemplate.process(element, loadTimeData); | 46 i18nTemplate.process(element, loadTimeData); |
| 47 } | 47 } |
| 48 | 48 |
| 49 /** | 49 /** |
| 50 * Returns 'N/A' (Not Available) text if |value| is undefined. | 50 * Returns 'N/A' (Not Available) text if |value| is undefined. |
| 51 * @param {Object} value Object to print. | 51 * @param {Object} value Object to print. |
| 52 * @return {string} 'N/A' or ''. | 52 * @return {string} 'N/A' or ''. |
| 53 * @private | 53 * @private |
| 54 */ | 54 */ |
| 55 function checkIfAvailable_(value) { | 55 function checkIfAvailable_(value) { |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 handlePerOriginInfo); | 527 handlePerOriginInfo); |
| 528 cr.quota.onStatisticsUpdated.addEventListener('update', handleStatistics); | 528 cr.quota.onStatisticsUpdated.addEventListener('update', handleStatistics); |
| 529 cr.quota.requestInfo(); | 529 cr.quota.requestInfo(); |
| 530 | 530 |
| 531 $('refresh-button').addEventListener('click', cr.quota.requestInfo, false); | 531 $('refresh-button').addEventListener('click', cr.quota.requestInfo, false); |
| 532 $('dump-button').addEventListener('click', dump, false); | 532 $('dump-button').addEventListener('click', dump, false); |
| 533 } | 533 } |
| 534 | 534 |
| 535 cr.doc.addEventListener('DOMContentLoaded', onLoad, false); | 535 cr.doc.addEventListener('DOMContentLoaded', onLoad, false); |
| 536 })(); | 536 })(); |
| OLD | NEW |