| 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 <include src="extension_error.js"> | 5 <include src="extension_error.js"> |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * The type of the extension data object. The definition is based on | 8 * The type of the extension data object. The definition is based on |
| 9 * chrome/browser/ui/webui/extensions/extension_basic_info.cc | 9 * chrome/browser/ui/webui/extensions/extension_basic_info.cc |
| 10 * and | 10 * and |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 * policyText: (string|undefined), | 51 * policyText: (string|undefined), |
| 52 * prettifiedPath: (string|undefined), | 52 * prettifiedPath: (string|undefined), |
| 53 * recommendedInstall: boolean, | 53 * recommendedInstall: boolean, |
| 54 * runtimeErrors: (Array<RuntimeError>|undefined), | 54 * runtimeErrors: (Array<RuntimeError>|undefined), |
| 55 * showAllUrls: boolean, | 55 * showAllUrls: boolean, |
| 56 * suspiciousInstall: boolean, | 56 * suspiciousInstall: boolean, |
| 57 * terminated: boolean, | 57 * terminated: boolean, |
| 58 * updateRequiredByPolicy: boolean, | 58 * updateRequiredByPolicy: boolean, |
| 59 * version: string, | 59 * version: string, |
| 60 * views: Array<{renderViewId: number, renderProcessId: number, | 60 * views: Array<{renderViewId: number, renderProcessId: number, |
| 61 * path: string, incognito: boolean, | 61 * url: string, incognito: boolean, |
| 62 * generatedBackgroundPage: boolean}>, | 62 * type: chrome.developerPrivate.ViewType}>, |
| 63 * wantsErrorCollection: boolean, | 63 * wantsErrorCollection: boolean, |
| 64 * wantsFileAccess: boolean, | 64 * wantsFileAccess: boolean, |
| 65 * warnings: (Array|undefined)}} | 65 * warnings: (Array|undefined)}} |
| 66 */ | 66 */ |
| 67 var ExtensionData; | 67 var ExtensionData; |
| 68 | 68 |
| 69 /////////////////////////////////////////////////////////////////////////////// | 69 /////////////////////////////////////////////////////////////////////////////// |
| 70 // ExtensionFocusRow: | 70 // ExtensionFocusRow: |
| 71 | 71 |
| 72 /** | 72 /** |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 // Link needs to be an only child before the list is updated. | 722 // Link needs to be an only child before the list is updated. |
| 723 while (link.nextElementSibling) | 723 while (link.nextElementSibling) |
| 724 item.removeChild(link.nextElementSibling); | 724 item.removeChild(link.nextElementSibling); |
| 725 | 725 |
| 726 // Link needs to be cleaned up if it was used before. | 726 // Link needs to be cleaned up if it was used before. |
| 727 link.textContent = ''; | 727 link.textContent = ''; |
| 728 if (link.clickHandler) | 728 if (link.clickHandler) |
| 729 link.removeEventListener('click', link.clickHandler); | 729 link.removeEventListener('click', link.clickHandler); |
| 730 | 730 |
| 731 extension.views.forEach(function(view, i) { | 731 extension.views.forEach(function(view, i) { |
| 732 var displayName = view.generatedBackgroundPage ? | 732 if (view.type == chrome.developerPrivate.ViewType.EXTENSION_DIALOG || |
| 733 loadTimeData.getString('backgroundPage') : view.path; | 733 view.type == chrome.developerPrivate.ViewType.EXTENSION_POPUP) { |
| 734 return; |
| 735 } |
| 736 var displayName; |
| 737 if (view.url.indexOf('chrome-extension://') == 0) { |
| 738 var pathOffset = 'chrome-extension://'.length + 32 + 1; |
| 739 displayName = view.url.substring(pathOffset); |
| 740 if (displayName == '_generated_background_page.html') |
| 741 displayName = loadTimeData.getString('backgroundPage'); |
| 742 } else { |
| 743 displayName = view.url; |
| 744 } |
| 734 var label = displayName + | 745 var label = displayName + |
| 735 (view.incognito ? | 746 (view.incognito ? |
| 736 ' ' + loadTimeData.getString('viewIncognito') : '') + | 747 ' ' + loadTimeData.getString('viewIncognito') : '') + |
| 737 (view.renderProcessId == -1 ? | 748 (view.renderProcessId == -1 ? |
| 738 ' ' + loadTimeData.getString('viewInactive') : ''); | 749 ' ' + loadTimeData.getString('viewInactive') : ''); |
| 739 link.textContent = label; | 750 link.textContent = label; |
| 740 link.clickHandler = function(e) { | 751 link.clickHandler = function(e) { |
| 741 chrome.developerPrivate.inspect({ | 752 chrome.developerPrivate.inspect({ |
| 742 extension_id: extension.id, | 753 extension_id: extension.id, |
| 743 render_process_id: view.renderProcessId, | 754 render_process_id: view.renderProcessId, |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 // TODO(dbeam): why do we need to focus <extensionoptions> before and | 925 // TODO(dbeam): why do we need to focus <extensionoptions> before and |
| 915 // after its showing animation? Makes very little sense to me. | 926 // after its showing animation? Makes very little sense to me. |
| 916 overlay.setInitialFocus(); | 927 overlay.setInitialFocus(); |
| 917 }, | 928 }, |
| 918 }; | 929 }; |
| 919 | 930 |
| 920 return { | 931 return { |
| 921 ExtensionList: ExtensionList | 932 ExtensionList: ExtensionList |
| 922 }; | 933 }; |
| 923 }); | 934 }); |
| OLD | NEW |