Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4763)

Unified Diff: chrome/browser/resources/options2/web_intents_defaults.js

Issue 10808092: Add settings UI for managing defaults (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698