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

Side by Side Diff: chrome/browser/resources/md_user_manager/user_manager_dialog.js

Issue 2024233003: MD User Manager: Refactors existing dialogs in User Manager into <user-manager-dialog> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@md-user-manager-locked-test
Patch Set: Reuse Polymer.PaperDialogBehavior 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview 'user-manager-dialog' is a modal dialog for the user manager.
7 */
8 Polymer({
9 is: 'user-manager-dialog',
10
11 behaviors: [Polymer.PaperDialogBehavior],
12
13 properties: {
14 /** @override */
15 noCancelOnOutsideClick: {
16 type: Boolean,
17 value: true
18 },
19
20 /** @override */
21 withBackdrop: {
22 type: Boolean,
23 value: true
24 },
25
26 /**
27 * The first node that can receive focus.
28 * @type {Node}
29 */
30 firstFocusableNode: {
31 type: Object,
32 value: function() { return this.$.close; },
33 observer: 'firstFocusableNodeChanged_'
34 },
35
36 /**
37 * The last node that can receive focus.
38 * @type {Node}
39 */
40 lastFocusableNode: {
41 type: Object,
42 value: function() { return this.$.close; },
43 observer: 'lastFocusableNodeChanged_'
44 }
45 },
46
47 /**
48 * Returns the first and the last focusable elements in order to wrap the
49 * focus for the dialog in Polymer.PaperDialogBehavior.
50 * @override
51 * @type {Array<Node>}
52 */
53 get _focusableNodes() {
54 return [this.firstFocusableNode, this.lastFocusableNode];
55 },
56
57 /**
58 * Observer for firstFocusableNode. Updates __firstFocusableNode in
59 * Polymer.PaperDialogBehavior.
60 */
61 firstFocusableNodeChanged_: function(newValue) {
62 this.__firstFocusableNode = newValue;
Moe 2016/06/03 21:51:50 __firstFocusableNode is not part of PaperDialogBeh
63 },
64
65 /**
66 * Observer for lastFocusableNodeChanged_. Updates __lastFocusableNode in
67 * Polymer.PaperDialogBehavior.
68 */
69 lastFocusableNodeChanged_: function(newValue) {
70 this.__lastFocusableNode = newValue;
71 }
72 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698