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 /** | 5 /** |
6 * This view displays information on installed Chrome extensions / apps as well | 6 * This view displays information on installed Chrome extensions / apps as well |
7 * as Winsock layered service providers and namespace providers. | 7 * as Winsock layered service providers and namespace providers. |
8 * | 8 * |
9 * For each layered service provider, shows the name, dll, and type | 9 * For each layered service provider, shows the name, dll, and type |
10 * information. For each namespace provider, shows the name and | 10 * information. For each namespace provider, shows the name and |
11 * whether or not it's active. | 11 * whether or not it's active. |
12 */ | 12 */ |
13 var ModulesView = (function() { | 13 var ModulesView = (function() { |
14 'use strict'; | 14 'use strict'; |
15 | 15 |
16 // We inherit from DivView. | 16 // We inherit from DivView. |
17 var superClass = DivView; | 17 var superClass = DivView; |
18 | 18 |
19 /** | 19 /** |
20 * @constructor | 20 * @constructor |
21 */ | 21 */ |
22 function ModulesView() { | 22 function ModulesView() { |
23 assertFirstConstructorCall(ModulesView); | 23 assertFirstConstructorCall(ModulesView); |
24 | 24 |
25 // Call superclass's constructor. | 25 // Call superclass's constructor. |
26 superClass.call(this, ModulesView.MAIN_BOX_ID); | 26 superClass.call(this, ModulesView.MAIN_BOX_ID); |
27 | 27 |
28 this.serviceProvidersTbody_ = | 28 this.serviceProvidersTbody_ = $(ModulesView.SERVICE_PROVIDERS_TBODY_ID); |
29 $(ModulesView.SERVICE_PROVIDERS_TBODY_ID); | 29 this.namespaceProvidersTbody_ = $(ModulesView.NAMESPACE_PROVIDERS_TBODY_ID); |
30 this.namespaceProvidersTbody_ = | |
31 $(ModulesView.NAMESPACE_PROVIDERS_TBODY_ID); | |
32 | 30 |
33 g_browser.addServiceProvidersObserver(this, false); | 31 g_browser.addServiceProvidersObserver(this, false); |
34 g_browser.addExtensionInfoObserver(this, true); | 32 g_browser.addExtensionInfoObserver(this, true); |
35 } | 33 } |
36 | 34 |
37 ModulesView.TAB_ID = 'tab-handle-modules'; | 35 ModulesView.TAB_ID = 'tab-handle-modules'; |
38 ModulesView.TAB_NAME = 'Modules'; | 36 ModulesView.TAB_NAME = 'Modules'; |
39 ModulesView.TAB_HASH = '#modules'; | 37 ModulesView.TAB_HASH = '#modules'; |
40 | 38 |
41 // IDs for special HTML elements in modules_view.html. | 39 // IDs for special HTML elements in modules_view.html. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 '32': 'NS_NTDS', | 116 '32': 'NS_NTDS', |
119 '37': 'NS_EMAIL', | 117 '37': 'NS_EMAIL', |
120 '38': 'NS_PNRPNAME', | 118 '38': 'NS_PNRPNAME', |
121 '39': 'NS_PNRPCLOUD' | 119 '39': 'NS_PNRPCLOUD' |
122 }; | 120 }; |
123 | 121 |
124 /** | 122 /** |
125 * Returns the type of a namespace provider as a string. | 123 * Returns the type of a namespace provider as a string. |
126 */ | 124 */ |
127 ModulesView.getNamespaceProviderType = function(namespaceProvider) { | 125 ModulesView.getNamespaceProviderType = function(namespaceProvider) { |
128 return tryGetValueWithKey(NAMESPACE_PROVIDER_PTYPE, | 126 return tryGetValueWithKey(NAMESPACE_PROVIDER_PTYPE, namespaceProvider.type); |
129 namespaceProvider.type); | |
130 }; | 127 }; |
131 | 128 |
132 return ModulesView; | 129 return ModulesView; |
133 })(); | 130 })(); |
OLD | NEW |