| Index: chrome/browser/resources/settings/settings_ui/settings_ui.js
|
| diff --git a/chrome/browser/resources/settings/settings_ui/settings_ui.js b/chrome/browser/resources/settings/settings_ui/settings_ui.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..85247d73448b601d168c9bdc35d0d77dad556eda
|
| --- /dev/null
|
| +++ b/chrome/browser/resources/settings/settings_ui/settings_ui.js
|
| @@ -0,0 +1,51 @@
|
| +// 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-ui' implements the UI for the Settings page.
|
| + *
|
| + * Example:
|
| + *
|
| + * <cr-settings-ui></cr-settings-ui>
|
| + *
|
| + * @group Chrome Settings Elements
|
| + * @element cr-settings-ui
|
| + */
|
| +Polymer('cr-settings-ui', {
|
| + publish: {
|
| + /**
|
| + * Ordered list of settings pages available to the user.
|
| + *
|
| + * To avoid unnecessary DOM manipulation, prefer using Array.prototype
|
| + * functions on this attribute rather than replacing it with a new array
|
| + * after setting the attribute initially.
|
| + *
|
| + * @attribute pages
|
| + * @type Array<!Object>
|
| + * @default []
|
| + */
|
| + pages: [],
|
| +
|
| + /**
|
| + * Index of the currently shown page in the menu.
|
| + *
|
| + * @attribute currentPageIndex
|
| + * @type number
|
| + * @default 0
|
| + */
|
| + currentPageIndex: 0,
|
| + },
|
| +
|
| + /**
|
| + * Updates the UI when a page is selected in the nav menu.
|
| + *
|
| + * @param {!Event} e The cr-settings-page-select event.
|
| + * @param {!Object} detail The selected page.
|
| + * @private
|
| + */
|
| + pageSelected_: function(e, detail) {
|
| + this.currentPageIndex = this.pages.indexOf(detail);
|
| + },
|
| +});
|
|
|