| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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('extensions', function() { | 5 cr.define('extensions', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * @constructor | 9 * @constructor |
| 10 * @implements {extensions.ItemDelegate} | 10 * @implements {extensions.ItemDelegate} |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 incognito: view.incognito, | 209 incognito: view.incognito, |
| 210 }); | 210 }); |
| 211 }, | 211 }, |
| 212 | 212 |
| 213 /** @override */ | 213 /** @override */ |
| 214 repairItem: function(id) { | 214 repairItem: function(id) { |
| 215 chrome.developerPrivate.repairExtension(id); | 215 chrome.developerPrivate.repairExtension(id); |
| 216 }, | 216 }, |
| 217 | 217 |
| 218 /** @override */ | 218 /** @override */ |
| 219 showItemOptionsPage: function(id) { |
| 220 var extension = this.extensions_.find(function(extension) { |
| 221 return extension.id == id; |
| 222 }); |
| 223 assert(extension && extension.optionsPage); |
| 224 if (extension.optionsPage.openInTab) |
| 225 chrome.developerPrivate.showOptions(id); |
| 226 // TODO(devlin): Handle embedded extension options. |
| 227 }, |
| 228 |
| 229 /** @override */ |
| 219 setProfileInDevMode: function(inDevMode) { | 230 setProfileInDevMode: function(inDevMode) { |
| 220 chrome.developerPrivate.updateProfileConfiguration( | 231 chrome.developerPrivate.updateProfileConfiguration( |
| 221 {inDeveloperMode: inDevMode}); | 232 {inDeveloperMode: inDevMode}); |
| 222 }, | 233 }, |
| 223 | 234 |
| 224 /** @override */ | 235 /** @override */ |
| 225 loadUnpacked: function() { | 236 loadUnpacked: function() { |
| 226 chrome.developerPrivate.loadUnpacked({failQuietly: true}); | 237 chrome.developerPrivate.loadUnpacked({failQuietly: true}); |
| 227 }, | 238 }, |
| 228 | 239 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 248 /** @override */ | 259 /** @override */ |
| 249 updateAllExtensions: function() { | 260 updateAllExtensions: function() { |
| 250 chrome.developerPrivate.autoUpdate(); | 261 chrome.developerPrivate.autoUpdate(); |
| 251 }, | 262 }, |
| 252 }; | 263 }; |
| 253 | 264 |
| 254 cr.addSingletonGetter(Service); | 265 cr.addSingletonGetter(Service); |
| 255 | 266 |
| 256 return {Service: Service}; | 267 return {Service: Service}; |
| 257 }); | 268 }); |
| OLD | NEW |