| 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="../shared/js/cr/ui/drag_wrapper.js"></include> | 5 <include src="../shared/js/cr/ui/drag_wrapper.js"></include> |
| 6 <include src="../uber/uber_utils.js"></include> | 6 <include src="../uber/uber_utils.js"></include> |
| 7 <include src="extension_commands_overlay.js"></include> | 7 <include src="extension_commands_overlay.js"></include> |
| 8 <include src="extension_focus_manager.js"></include> | 8 <include src="extension_focus_manager.js"></include> |
| 9 <include src="extension_list.js"></include> | 9 <include src="extension_list.js"></include> |
| 10 <include src="pack_extension_overlay.js"></include> | 10 <include src="pack_extension_overlay.js"></include> |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 if (a.order == b.order) { | 216 if (a.order == b.order) { |
| 217 a = a.name.toLowerCase(); | 217 a = a.name.toLowerCase(); |
| 218 b = b.name.toLowerCase(); | 218 b = b.name.toLowerCase(); |
| 219 return a < b ? -1 : (a > b ? 1 : 0); | 219 return a < b ? -1 : (a > b ? 1 : 0); |
| 220 } else { | 220 } else { |
| 221 return a.order < b.order ? -1 : 1; | 221 return a.order < b.order ? -1 : 1; |
| 222 } | 222 } |
| 223 }); | 223 }); |
| 224 } | 224 } |
| 225 | 225 |
| 226 if (extensionsData.developerMode) { | 226 var pageDiv = $('extension-settings'); |
| 227 if (extensionsData.managedMode) { |
| 228 pageDiv.classList.add('showing-banner'); |
| 229 pageDiv.classList.add('managed-mode'); |
| 230 $('toggle-dev-on').disabled = true; |
| 231 } else { |
| 232 pageDiv.classList.remove('showing-banner'); |
| 233 pageDiv.classList.remove('managed-mode'); |
| 234 $('toggle-dev-on').disabled = false; |
| 235 } |
| 236 |
| 237 if (extensionsData.developerMode && !extensionsData.managedMode) { |
| 238 pageDiv.classList.add('dev-mode'); |
| 227 $('toggle-dev-on').checked = true; | 239 $('toggle-dev-on').checked = true; |
| 228 $('extension-settings').classList.add('dev-mode'); | |
| 229 $('dev-controls').hidden = false; | |
| 230 } else { | 240 } else { |
| 241 pageDiv.classList.remove('dev-mode'); |
| 231 $('toggle-dev-on').checked = false; | 242 $('toggle-dev-on').checked = false; |
| 232 $('extension-settings').classList.remove('dev-mode'); | |
| 233 } | 243 } |
| 234 | 244 |
| 235 $('load-unpacked').disabled = extensionsData.loadUnpackedDisabled; | 245 $('load-unpacked').disabled = extensionsData.loadUnpackedDisabled; |
| 236 | 246 |
| 237 ExtensionsList.prototype.data_ = extensionsData; | 247 ExtensionsList.prototype.data_ = extensionsData; |
| 238 var extensionList = $('extension-settings-list'); | 248 var extensionList = $('extension-settings-list'); |
| 239 ExtensionsList.decorate(extensionList); | 249 ExtensionsList.decorate(extensionList); |
| 240 } | 250 } |
| 241 | 251 |
| 242 // Indicate that warning |message| has occured for pack of |crx_path| and | 252 // Indicate that warning |message| has occured for pack of |crx_path| and |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 return { | 331 return { |
| 322 ExtensionSettings: ExtensionSettings | 332 ExtensionSettings: ExtensionSettings |
| 323 }; | 333 }; |
| 324 }); | 334 }); |
| 325 | 335 |
| 326 var ExtensionSettings = extensions.ExtensionSettings; | 336 var ExtensionSettings = extensions.ExtensionSettings; |
| 327 | 337 |
| 328 window.addEventListener('load', function(e) { | 338 window.addEventListener('load', function(e) { |
| 329 ExtensionSettings.getInstance().initialize(); | 339 ExtensionSettings.getInstance().initialize(); |
| 330 }); | 340 }); |
| OLD | NEW |