| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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('apps_dev_tool', function() { | 5 cr.define('apps_dev_tool', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * AppsDevTool constructor. | 9 * AppsDevTool constructor. |
| 10 * @constructor | 10 * @constructor |
| 11 * @extends {HTMLDivElement} | 11 * @extends {HTMLDivElement} |
| 12 */ | 12 */ |
| 13 function AppsDevTool() {} | 13 function AppsDevTool() {} |
| 14 | 14 |
| 15 AppsDevTool.prototype = { | 15 AppsDevTool.prototype = { |
| 16 __proto__: HTMLDivElement.prototype, | 16 __proto__: HTMLDivElement.prototype, |
| 17 | 17 |
| 18 /** | 18 /** |
| 19 * Perform initial setup. | 19 * Perform initial setup. |
| 20 */ | 20 */ |
| 21 initialize: function() { | 21 initialize: function() { |
| 22 cr.ui.decorate('tabbox', cr.ui.TabBox); |
| 23 |
| 22 // Set up the three buttons (load unpacked, pack and update). | 24 // Set up the three buttons (load unpacked, pack and update). |
| 23 $('load-unpacked').addEventListener('click', | 25 $('load-unpacked').addEventListener('click', |
| 24 this.handleLoadUnpackedItem_.bind(this)); | 26 this.handleLoadUnpackedItem_.bind(this)); |
| 25 $('pack-item').addEventListener('click', | 27 $('pack-item').addEventListener('click', |
| 26 this.handlePackItem_.bind(this)); | 28 this.handlePackItem_.bind(this)); |
| 27 $('update-items-now').addEventListener('click', | 29 $('update-items-now').addEventListener('click', |
| 28 this.handleUpdateItemNow_.bind(this)); | 30 this.handleUpdateItemNow_.bind(this)); |
| 29 var packItemOverlay = | 31 var packItemOverlay = |
| 30 apps_dev_tool.PackItemOverlay.getInstance().initializePage(); | 32 apps_dev_tool.PackItemOverlay.getInstance().initializePage(); |
| 31 }, | 33 }, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 chrome.developerPrivate.getStrings(function(strings) { | 92 chrome.developerPrivate.getStrings(function(strings) { |
| 91 loadTimeData.data = strings; | 93 loadTimeData.data = strings; |
| 92 i18nTemplate.process(document, loadTimeData); | 94 i18nTemplate.process(document, loadTimeData); |
| 93 }); | 95 }); |
| 94 }; | 96 }; |
| 95 | 97 |
| 96 return { | 98 return { |
| 97 AppsDevTool: AppsDevTool, | 99 AppsDevTool: AppsDevTool, |
| 98 }; | 100 }; |
| 99 }); | 101 }); |
| OLD | NEW |