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

Unified Diff: ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.js

Issue 2068713003: Refactors profile avatar selector into a Polymer element to use in md-settings & md-user-manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.js
diff --git a/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.js b/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.js
new file mode 100644
index 0000000000000000000000000000000000000000..637caa786995b78e3ca695a63ed8c3fcf12c97a0
--- /dev/null
+++ b/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.js
@@ -0,0 +1,35 @@
+// 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 'cr-profile-avatar-selector' is an element that displays
+ * profile avatar icons and allows an avatar to be selected.
+ */
+
+/** @typedef {{url: string, label: string}} */
+var AvatarIcon;
+
+Polymer({
+ is: 'cr-profile-avatar-selector',
+
+ properties: {
+ /**
+ * The currently selected profile avatar Url. May be a data URI.
tommycli 2016/06/14 23:51:00 UURL should be capitalized.
Moe 2016/06/15 19:35:01 Done. I vaguely remember dbeam@ was against capita
tommycli 2016/06/15 19:59:47 I think only in variable names. I think he said it
+ * @type {string}
+ */
+ selectedAvatarUrl: {
+ type: String,
+ notify: true
+ },
+
+ /**
+ * The list of available profile avatar Urls and labels.
tommycli 2016/06/14 23:51:00 same here
Moe 2016/06/15 19:35:01 Done.
+ * @type {!Array<!AvatarIcon>}
+ */
+ avatars: {
+ type: Array,
+ value: function() { return []; }
+ }
+ }
+});

Powered by Google App Engine
This is Rietveld 408576698