Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 cr.define('options', function() { | |
| 6 /** @const */ var OptionsPage = options.OptionsPage; | |
| 7 | |
| 8 ///////////////////////////////////////////////////////////////////////////// | |
| 9 // WebIntentsDefaults class: | |
| 10 | |
| 11 /** | |
| 12 * Encapsulated handling of handler options page. | |
| 13 * @constructor | |
|
csilv
2012/08/09 18:18:04
nit: @extends OptionsPage
| |
| 14 */ | |
| 15 function WebIntentsDefaults() { | |
| 16 this.activeNavTab = null; | |
| 17 OptionsPage.call( | |
| 18 this, | |
| 19 'web-intents-defaults', | |
| 20 loadTimeData.getString('web_intents_defaults_overlay_title'), | |
| 21 'web-intents-defaults'); | |
| 22 } | |
| 23 | |
| 24 cr.addSingletonGetter(WebIntentsDefaults); | |
| 25 | |
| 26 WebIntentsDefaults.prototype = { | |
| 27 __proto__: OptionsPage.prototype, | |
| 28 | |
| 29 /** @inheritDoc */ | |
| 30 initializePage: function() { | |
| 31 OptionsPage.prototype.initializePage.call(this); | |
| 32 options.ServiceList.decorate($('services-list')); | |
| 33 $('web-intents-defaults-confirm').onclick = | |
| 34 OptionsPage.closeOverlay.bind(OptionsPage); | |
| 35 }, | |
| 36 }; | |
| 37 | |
| 38 /** | |
| 39 * Sets the list of handlers shown by the view. | |
| 40 * @param {Array} Handlers to be shown in the view. | |
| 41 */ | |
| 42 WebIntentsDefaults.setServices = function(services) { | |
| 43 $('services-list').setServices(services); | |
| 44 }; | |
| 45 | |
| 46 return { | |
| 47 WebIntentsDefaults: WebIntentsDefaults | |
| 48 }; | |
| 49 }); | |
| OLD | NEW |