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

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

Issue 2957943003: MD User manager: Migrate from PaperDialogBehavior to cr-dialog. (Closed)
Patch Set: Restore color. Created 3 years, 5 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: {type: Boolean, value: true},
16
17 /** @override */
18 withBackdrop: {type: Boolean, value: true},
19
20 /**
21 * The first node that can receive focus.
22 * @type {!Node}
23 */
24 firstFocusableNode: {
25 type: Object,
26 value: function() {
27 return this.$.close;
28 },
29 observer: 'firstFocusableNodeChanged_'
30 },
31
32 /**
33 * The last node that can receive focus.
34 * @type {!Node}
35 */
36 lastFocusableNode: {
37 type: Object,
38 value: function() {
39 return this.$.close;
40 },
41 observer: 'lastFocusableNodeChanged_'
42 }
43 },
44
45 /**
46 * Returns the first and the last focusable elements in order to wrap the
47 * focus for the dialog in Polymer.PaperDialogBehavior.
48 * @override
49 * @type {!Array<!Node>}
50 */
51 get _focusableNodes() {
52 return [this.firstFocusableNode, this.lastFocusableNode];
53 },
54
55 /**
56 * Observer for firstFocusableNode. Updates __firstFocusableNode in
57 * Polymer.PaperDialogBehavior.
58 */
59 firstFocusableNodeChanged_: function(newValue) {
60 this.__firstFocusableNode = newValue;
61 },
62
63 /**
64 * Observer for lastFocusableNodeChanged_. Updates __lastFocusableNode in
65 * Polymer.PaperDialogBehavior.
66 */
67 lastFocusableNodeChanged_: function(newValue) {
68 this.__lastFocusableNode = newValue;
69 }
70 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698