| 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 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * A lookup helper function to find the first node that has an id (starting | 9 * A lookup helper function to find the first node that has an id (starting |
| 10 * at |node| and going up the parent chain). | 10 * at |node| and going up the parent chain). |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 var options = node.querySelector('.options-link'); | 125 var options = node.querySelector('.options-link'); |
| 126 options.addEventListener('click', function(e) { | 126 options.addEventListener('click', function(e) { |
| 127 chrome.send('extensionSettingsOptions', [extension.id]); | 127 chrome.send('extensionSettingsOptions', [extension.id]); |
| 128 e.preventDefault(); | 128 e.preventDefault(); |
| 129 }); | 129 }); |
| 130 options.hidden = false; | 130 options.hidden = false; |
| 131 } | 131 } |
| 132 | 132 |
| 133 if (extension.allow_activity) { | 133 if (extension.allow_activity) { |
| 134 var activity = node.querySelector('.activity-link'); | 134 var activity = node.querySelector('.activity-link'); |
| 135 activity.href = 'chrome://extension-activity?extensionId=' + | 135 activity.addEventListener('click', function(e) { |
| 136 extension.id; | 136 chrome.send('navigateToUrl', [ |
| 137 'chrome://extension-activity?extensionId=' + extension.id, |
| 138 '_blank', |
| 139 e.button, |
| 140 e.altKey, |
| 141 e.ctrlKey, |
| 142 e.metaKey, |
| 143 e.shiftKey |
| 144 ]); |
| 145 e.preventDefault(); |
| 146 }); |
| 137 activity.hidden = false; | 147 activity.hidden = false; |
| 138 } | 148 } |
| 139 | 149 |
| 140 // The 'View in Web Store/View Web Site' link. | 150 // The 'View in Web Store/View Web Site' link. |
| 141 if (extension.homepageUrl) { | 151 if (extension.homepageUrl) { |
| 142 var siteLink = node.querySelector('.site-link'); | 152 var siteLink = node.querySelector('.site-link'); |
| 143 siteLink.href = extension.homepageUrl; | 153 siteLink.href = extension.homepageUrl; |
| 144 siteLink.textContent = loadTimeData.getString( | 154 siteLink.textContent = loadTimeData.getString( |
| 145 extension.homepageProvided ? 'extensionSettingsVisitWebsite' : | 155 extension.homepageProvided ? 'extensionSettingsVisitWebsite' : |
| 146 'extensionSettingsVisitWebStore'); | 156 'extensionSettingsVisitWebStore'); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 } | 266 } |
| 257 | 267 |
| 258 this.appendChild(node); | 268 this.appendChild(node); |
| 259 }, | 269 }, |
| 260 }; | 270 }; |
| 261 | 271 |
| 262 return { | 272 return { |
| 263 ExtensionsList: ExtensionsList | 273 ExtensionsList: ExtensionsList |
| 264 }; | 274 }; |
| 265 }); | 275 }); |
| OLD | NEW |