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

Side by Side Diff: chrome/browser/resources/apps_debugger/js/items_list.js

Issue 17095008: Fix the bug that crashed apps are missing from Apps Developer Tool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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 (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 // The list of all packed/unpacked apps and extensions. 8 // The list of all packed/unpacked apps and extensions.
9 var completeList = []; 9 var completeList = [];
10 10
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } else { 232 } else {
233 node.querySelector('.extension-run-button').hidden = true; 233 node.querySelector('.extension-run-button').hidden = true;
234 node.querySelector('.extension-restart-button').hidden = true; 234 node.querySelector('.extension-restart-button').hidden = true;
235 node.querySelector('.extension-show-logs-button').hidden = true; 235 node.querySelector('.extension-show-logs-button').hidden = true;
236 } 236 }
237 237
238 // The terminated reload link. 238 // The terminated reload link.
239 if (!item.terminated) 239 if (!item.terminated)
240 this.setEnabledCheckbox_(item, node); 240 this.setEnabledCheckbox_(item, node);
241 else 241 else
242 this.setTerminatedReloadLink_(node, item); 242 this.setTerminatedReloadLink_(item, node);
243 243
244 // Set remove button handler. 244 // Set remove button handler.
245 this.setRemoveButton_(item, node); 245 this.setRemoveButton_(item, node);
246 246
247 // First get the item id. 247 // First get the item id.
248 var idLabel = node.querySelector('.extension-id'); 248 var idLabel = node.querySelector('.extension-id');
249 idLabel.textContent = ' ' + item.id; 249 idLabel.textContent = ' ' + item.id;
250 250
251 // Set the path and show the pack button, if provided by unpacked 251 // Set the path and show the pack button, if provided by unpacked
252 // app / extension. 252 // app / extension.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 }, 305 },
306 306
307 /** 307 /**
308 * Sets the terminated reload link handler. 308 * Sets the terminated reload link handler.
309 * @param {!Object} item A dictionary of item metadata. 309 * @param {!Object} item A dictionary of item metadata.
310 * @param {!HTMLElement} el HTML element containing all items. 310 * @param {!HTMLElement} el HTML element containing all items.
311 * @private 311 * @private
312 */ 312 */
313 setTerminatedReloadLink_: function(item, el) { 313 setTerminatedReloadLink_: function(item, el) {
314 var terminatedReload = el.querySelector('.terminated-reload-link'); 314 var terminatedReload = el.querySelector('.terminated-reload-link');
315 terminatedReload.addEventListener('click', function(e) {
316 chrome.developerPrivate.reload(item.id, function() {
317 ItemsList.loadItemsInfo();
318 });
319 });
315 terminatedReload.hidden = false; 320 terminatedReload.hidden = false;
316 chrome.developerPrivate.reload(item.id, function() {
317 ItemsList.loadItemsInfo();
318 });
319 }, 321 },
320 322
321 /** 323 /**
322 * Sets the permissions link handler. 324 * Sets the permissions link handler.
323 * @param {!Object} item A dictionary of item metadata. 325 * @param {!Object} item A dictionary of item metadata.
324 * @param {!HTMLElement} el HTML element containing all items. 326 * @param {!HTMLElement} el HTML element containing all items.
325 * @private 327 * @private
326 */ 328 */
327 setPermissionsLink_: function(item, el) { 329 setPermissionsLink_: function(item, el) {
328 var permissions = el.querySelector('.permissions-link'); 330 var permissions = el.querySelector('.permissions-link');
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 var node = $(id); 561 var node = $(id);
560 document.body.scrollTop = node.offsetTop - firstItem.offsetTop; 562 document.body.scrollTop = node.offsetTop - firstItem.offsetTop;
561 var unpacked = new ItemsList($('unpacked-list'), unpackedList); 563 var unpacked = new ItemsList($('unpacked-list'), unpackedList);
562 unpacked.setExtensionDetailsVisible_(node, true); 564 unpacked.setExtensionDetailsVisible_(node, true);
563 }; 565 };
564 566
565 return { 567 return {
566 ItemsList: ItemsList, 568 ItemsList: ItemsList,
567 }; 569 };
568 }); 570 });
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