Chromium Code Reviews| Index: chrome/browser/resources/options2/web_intents_defaults.js |
| diff --git a/chrome/browser/resources/options2/web_intents_defaults.js b/chrome/browser/resources/options2/web_intents_defaults.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..afbfca213186aed7f54134c33598242b227a2b10 |
| --- /dev/null |
| +++ b/chrome/browser/resources/options2/web_intents_defaults.js |
| @@ -0,0 +1,49 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +cr.define('options', function() { |
| + /** @const */ var OptionsPage = options.OptionsPage; |
| + |
| + ///////////////////////////////////////////////////////////////////////////// |
| + // WebIntentsDefaults class: |
| + |
| + /** |
| + * Encapsulated handling of handler options page. |
| + * @constructor |
|
csilv
2012/08/09 18:18:04
nit: @extends OptionsPage
|
| + */ |
| + function WebIntentsDefaults() { |
| + this.activeNavTab = null; |
| + OptionsPage.call( |
| + this, |
| + 'web-intents-defaults', |
| + loadTimeData.getString('web_intents_defaults_overlay_title'), |
| + 'web-intents-defaults'); |
| + } |
| + |
| + cr.addSingletonGetter(WebIntentsDefaults); |
| + |
| + WebIntentsDefaults.prototype = { |
| + __proto__: OptionsPage.prototype, |
| + |
| + /** @inheritDoc */ |
| + initializePage: function() { |
| + OptionsPage.prototype.initializePage.call(this); |
| + options.ServiceList.decorate($('services-list')); |
| + $('web-intents-defaults-confirm').onclick = |
| + OptionsPage.closeOverlay.bind(OptionsPage); |
| + }, |
| + }; |
| + |
| + /** |
| + * Sets the list of handlers shown by the view. |
| + * @param {Array} Handlers to be shown in the view. |
| + */ |
| + WebIntentsDefaults.setServices = function(services) { |
| + $('services-list').setServices(services); |
| + }; |
| + |
| + return { |
| + WebIntentsDefaults: WebIntentsDefaults |
| + }; |
| +}); |