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

Unified Diff: chrome/browser/resources/md_user_manager/user_manager_pages.js

Issue 1722843002: MD user manager (html/js/css for create profile flow) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments #6 Created 4 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/md_user_manager/user_manager_pages.js
diff --git a/chrome/browser/resources/md_user_manager/user_manager_pages.js b/chrome/browser/resources/md_user_manager/user_manager_pages.js
new file mode 100644
index 0000000000000000000000000000000000000000..752a369bae8f407f9626fabfd9d2bc4f42c9fd91
--- /dev/null
+++ b/chrome/browser/resources/md_user_manager/user_manager_pages.js
@@ -0,0 +1,47 @@
+// Copyright 2016 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 'user-manager-pages' is the element that controls paging in the
+ * user manager screen.
+ *
+ * @element user-manager-pages
+ */
+Polymer({
+ is: 'user-manager-pages',
+
+ properties: {
+ /**
+ * ID of the currently selected page.
+ * @private {string}
+ */
+ selectedPage_: {
+ type: String,
+ value: 'user-pods-page'
+ }
+ },
+
+ listeners: {
+ 'change-page': 'changePage_'
+ },
+
+ /**
+ * Changes the currently selected page.
+ * @param {Event} e The event containing ID of the selected page.
+ * @private
+ */
+ changePage_: function(e) {
+ this.selectedPage_ = e.detail.page;
+ },
+
+ /**
+ * Returns True if the given page should be visible.
+ * @param {string} selectedPage ID of the currently selected page.
+ * @param {string} page ID of the given page.
+ * @return {boolean}
+ */
+ isPageVisible_: function(selectedPage, page) {
+ return this.selectedPage_ == page;
+ }
+});

Powered by Google App Engine
This is Rietveld 408576698