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

Unified Diff: chrome/browser/resources/settings/settings.js

Issue 986843002: Scaffold for MD-Settings, inside chrome://md-settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add to chrome://md-settings Created 5 years, 9 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/settings/settings.js
diff --git a/chrome/browser/resources/settings/settings.js b/chrome/browser/resources/settings/settings.js
new file mode 100644
index 0000000000000000000000000000000000000000..be55ecf4e12f83e52fc4fed3e968783ec639af2c
--- /dev/null
+++ b/chrome/browser/resources/settings/settings.js
@@ -0,0 +1,37 @@
+// Copyright 2015 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.
+
+/**
+ * @fileoverview
+ * 'cr-settings' is the main MD-Settings element, combining the UI and models
+ * and controlling which pages are shown.
+ *
+ * Example:
+ *
+ * <cr-settings></cr-settings>
+ *
+ * @group Chrome Settings Elements
+ * @element cr-settings
+ */
+Polymer('cr-settings', {
+ /**
+ * Settings pages available to the user.
+ *
+ * @private Array<!CrSettingsPage>
+ */
+ pages_: [],
+
+ /** @override */
+ ready: function() {
+ // Add pages depending on the platform. Pages should be imported in
+ // settings.html.
+ if (utils.isChromeOs())
+ this.pages_.push(new CrSettingsA11yPage());
Jeremy Klein 2015/03/07 23:55:13 I really still feel like I'd rather do this declar
+
+ this.pages_.push(new CrSettingsDummyPage());
+
+ for (var i = 0; i < this.pages_.length; i++)
+ this.pages_[i].prefs = this.$.settings;
+ },
+});

Powered by Google App Engine
This is Rietveld 408576698