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 /** @const */ var Preferences = options.Preferences; | 6 /** @const */ var Preferences = options.Preferences; |
7 | 7 |
8 /** | 8 /** |
9 * A controlled setting indicator that can be placed on a setting as an | 9 * A controlled setting indicator that can be placed on a setting as an |
10 * indicator that the value is controlled by some external entity such as | 10 * indicator that the value is controlled by some external entity such as |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 var extensionName = extensionContainer.querySelector( | 167 var extensionName = extensionContainer.querySelector( |
168 '.controlled-setting-bubble-extension-name'); | 168 '.controlled-setting-bubble-extension-name'); |
169 extensionName.textContent = this.extensionName; | 169 extensionName.textContent = this.extensionName; |
170 extensionName.style.backgroundImage = | 170 extensionName.style.backgroundImage = |
171 'url("' + this.extensionIcon + '")'; | 171 'url("' + this.extensionIcon + '")'; |
172 | 172 |
173 var manageLink = extensionContainer.querySelector( | 173 var manageLink = extensionContainer.querySelector( |
174 '.controlled-setting-bubble-extension-manage-link'); | 174 '.controlled-setting-bubble-extension-manage-link'); |
175 var extensionId = this.extensionId; | 175 var extensionId = this.extensionId; |
176 manageLink.onclick = function() { | 176 manageLink.onclick = function() { |
177 uber.invokeMethodOnWindow( | 177 if (window != window.top) { |
178 window.top, 'showPage', | 178 uber.invokeMethodOnWindow( |
179 {pageId: 'extensions', path: '?id=' + extensionId}); | 179 window.top, 'showPage', |
| 180 {pageId: 'extensions', path: '?id=' + extensionId}); |
| 181 } else { |
| 182 window.open('chrome://extensions/?id=' + extensionId); |
| 183 } |
180 }; | 184 }; |
181 | 185 |
182 var disableButton = extensionContainer.querySelector( | 186 var disableButton = extensionContainer.querySelector( |
183 '.controlled-setting-bubble-extension-disable-button'); | 187 '.controlled-setting-bubble-extension-disable-button'); |
184 disableButton.onclick = | 188 disableButton.onclick = |
185 function() { chrome.send('disableExtension', [extensionId]); }; | 189 function() { chrome.send('disableExtension', [extensionId]); }; |
186 content.appendChild(extensionContainer); | 190 content.appendChild(extensionContainer); |
187 } | 191 } |
188 return content; | 192 return content; |
189 }, | 193 }, |
(...skipping 23 matching lines...) Expand all Loading... |
213 * ensuring that only one of them is visible at a time. | 217 * ensuring that only one of them is visible at a time. |
214 */ | 218 */ |
215 cr.defineProperty(ControlledSettingIndicator, 'value', | 219 cr.defineProperty(ControlledSettingIndicator, 'value', |
216 cr.PropertyKind.ATTR); | 220 cr.PropertyKind.ATTR); |
217 | 221 |
218 // Export. | 222 // Export. |
219 return { | 223 return { |
220 ControlledSettingIndicator: ControlledSettingIndicator | 224 ControlledSettingIndicator: ControlledSettingIndicator |
221 }; | 225 }; |
222 }); | 226 }); |
OLD | NEW |