Index: chrome/browser/resources/md_user_manager/control_bar.js |
diff --git a/chrome/browser/resources/md_user_manager/control_bar.js b/chrome/browser/resources/md_user_manager/control_bar.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9fda5063b73a33ba0e2ee2f91ca3903c1ae907f7 |
--- /dev/null |
+++ b/chrome/browser/resources/md_user_manager/control_bar.js |
@@ -0,0 +1,54 @@ |
+/* 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 |
+ * 'control-bar' is the horizontal bar at the bottom of the user manager screen. |
+ * |
+ * @element control-bar |
+ */ |
+ Polymer({ |
+ is: 'control-bar', |
+ |
+ properties: { |
+ |
+ /** |
+ * Controls whether that |Browse as Guest| button is displayed. |
tommycli
2016/02/08 18:45:18
Actually I thought the "True if ..." is better sin
Moe
2016/02/09 00:15:33
Done.
|
+ * @type {boolean} |
+ */ |
+ showGuest: { |
+ type: Boolean, |
+ value: false |
+ }, |
+ |
+ /** |
+ * Controls whether that |Add Person| button is displayed. |
+ * @type {boolean} |
+ */ |
+ showAddPerson: { |
+ type: Boolean, |
+ value: false |
+ } |
+ }, |
+ |
+ /** |
+ * Handler for |Browse as Guest| button click event. |
+ * @param {!Event} event |
+ * @private |
+ */ |
+ handleGuestClick_: function(event) { |
+ chrome.send('launchGuest'); |
+ }, |
+ |
+ /** |
+ * Handler for |Add Person| button click event. |
+ * @param {!Event} event |
+ * @private |
+ */ |
+ handleAddUserClick_: function(event) { |
+ // Event is caught by user-manager-pages. |
+ this.fire('change-page', {page: 'create-user-page'}); |
+ } |
+}); |