| Index: chrome/browser/resources/apps_debugger/js/items_list.js
|
| diff --git a/chrome/browser/resources/apps_debugger/js/items_list.js b/chrome/browser/resources/apps_debugger/js/items_list.js
|
| index 9494fa22bf1a233bc45a74d53f22d103b1d65f68..b69071daef4f491b1868fb31bcf9bbe19c4820fa 100644
|
| --- a/chrome/browser/resources/apps_debugger/js/items_list.js
|
| +++ b/chrome/browser/resources/apps_debugger/js/items_list.js
|
| @@ -146,6 +146,9 @@ cr.define('apps_dev_tool', function() {
|
| var description = node.querySelector('.extension-description span');
|
| description.textContent = item.description;
|
|
|
| + // The 'allow in incognito' checkbox.
|
| + this.setAllowIncognitoCheckbox_(item, node);
|
| +
|
| // The 'allow file:// access' checkbox.
|
| if (item.wants_file_access)
|
| this.setAllowFileAccessCheckbox_(item, node);
|
| @@ -291,6 +294,7 @@ cr.define('apps_dev_tool', function() {
|
| fileAccess.addEventListener('click', function(e) {
|
| chrome.developerPrivate.allowFileAccess(
|
| item.id, !!e.target.checked, function(result) {
|
| + ItemsList.loadItemsInfo();
|
| });
|
| });
|
| fileAccess.querySelector('input').checked = item.allow_file_access;
|
| @@ -298,6 +302,26 @@ cr.define('apps_dev_tool', function() {
|
| },
|
|
|
| /**
|
| + * Sets the handler for the allow_incognito checkbox.
|
| + * @param {!Object} item A dictionary of item metadata.
|
| + * @param {HTMLElement} el HTML element containing all items.
|
| + * @private
|
| + */
|
| + setAllowIncognitoCheckbox_: function(item, el) {
|
| + if (item.allow_incognito) {
|
| + var incognito = el.querySelector('.incognito-control');
|
| + incognito.addEventListener('change', function(e) {
|
| + chrome.developerPrivate.allowIncognito(
|
| + item.id, !!e.target.checked, function() {
|
| + ItemsList.loadItemsInfo();
|
| + });
|
| + });
|
| + incognito.querySelector('input').checked = item.incognito_enabled;
|
| + incognito.hidden = false;
|
| + }
|
| + },
|
| +
|
| + /**
|
| * Sets the active views link of an item. Clicking on the link
|
| * opens devtools window to inspect.
|
| * @param {!Object} item A dictionary of item metadata.
|
|
|