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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 }); | 272 }); |
273 fileAccess.querySelector('input').checked = extension.allowFileAccess; | 273 fileAccess.querySelector('input').checked = extension.allowFileAccess; |
274 fileAccess.hidden = false; | 274 fileAccess.hidden = false; |
275 } | 275 } |
276 | 276 |
277 // The 'Options' button or link, depending on its behaviour. | 277 // The 'Options' button or link, depending on its behaviour. |
278 if (extension.enabled && extension.optionsUrl) { | 278 if (extension.enabled && extension.optionsUrl) { |
279 var options, optionsClickListener; | 279 var options, optionsClickListener; |
280 if (extension.optionsOpenInTab) { | 280 if (extension.optionsOpenInTab) { |
281 options = node.querySelector('.options-link'); | 281 options = node.querySelector('.options-link'); |
| 282 // Set an href to get the correct mouse-over appearance (link, |
| 283 // footer) - but the actual link opening is done through chrome.send |
| 284 // with a preventDefault(). |
| 285 options.setAttribute('href', extension.optionsPageHref); |
282 optionsClickListener = function() { | 286 optionsClickListener = function() { |
283 chrome.send('extensionSettingsOptions', [extension.id]); | 287 chrome.send('extensionSettingsOptions', [extension.id]); |
284 }; | 288 }; |
285 } else { | 289 } else { |
286 options = node.querySelector('.options-button'); | 290 options = node.querySelector('.options-button'); |
287 optionsClickListener = function() { | 291 optionsClickListener = function() { |
288 this.showEmbeddedExtensionOptions_(extension.id, false); | 292 this.showEmbeddedExtensionOptions_(extension.id, false); |
289 }.bind(this); | 293 }.bind(this); |
290 } | 294 } |
291 options.addEventListener('click', function(e) { | 295 options.addEventListener('click', function(e) { |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 $('overlay').addEventListener('cancelOverlay', function() { | 552 $('overlay').addEventListener('cancelOverlay', function() { |
549 this.optionsShown_ = false; | 553 this.optionsShown_ = false; |
550 }.bind(this)); | 554 }.bind(this)); |
551 }, | 555 }, |
552 }; | 556 }; |
553 | 557 |
554 return { | 558 return { |
555 ExtensionsList: ExtensionsList | 559 ExtensionsList: ExtensionsList |
556 }; | 560 }; |
557 }); | 561 }); |
OLD | NEW |