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

Side by Side Diff: chrome/browser/resources/options/chromeos/quick_unlock_configure_overlay.js

Issue 2270173002: add stylus metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate A11y review comments Created 4 years, 3 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
« no previous file with comments | « chrome/browser/resources/options/chromeos/quick_unlock_configure_overlay.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 var Page = cr.ui.pageManager.Page; 6 var Page = cr.ui.pageManager.Page;
7 var PageManager = cr.ui.pageManager.PageManager; 7 var PageManager = cr.ui.pageManager.PageManager;
8 8
9 /** 9 /**
10 * QuickUnlockConfigureOverlay class 10 * QuickUnlockConfigureOverlay class
11 * Dialog that allows users to configure screen lock. 11 * Dialog that allows users to configure screen lock.
12 * @constructor 12 * @constructor
13 * @extends {cr.ui.pageManager.Page} 13 * @extends {cr.ui.pageManager.Page}
14 */ 14 */
15 function QuickUnlockConfigureOverlay() { 15 function QuickUnlockConfigureOverlay() {
16 Page.call(this, 'quickUnlockConfigureOverlay', 16 Page.call(this, 'quickUnlockConfigureOverlay',
17 loadTimeData.getString('lockScreenTitle'), 17 loadTimeData.getString('lockScreenTitle'),
18 'quick-unlock-configure-overlay'); 18 'quick-unlock-configure-overlay');
19 19
20 } 20 }
21 21
22 cr.addSingletonGetter(QuickUnlockConfigureOverlay); 22 cr.addSingletonGetter(QuickUnlockConfigureOverlay);
23 23
24 QuickUnlockConfigureOverlay.prototype = { 24 QuickUnlockConfigureOverlay.prototype = {
25 __proto__: Page.prototype, 25 __proto__: Page.prototype,
26 26
27 /** @override */ 27 /** @override */
28 initializePage: function() { 28 initializePage: function() {
29 Page.prototype.initializePage.call(this); 29 Page.prototype.initializePage.call(this);
30 $('screen-lock-done').onclick = function() {
31 QuickUnlockConfigureOverlay.dismiss();
32 };
30 }, 33 },
31 34
32 /** @override */ 35 /** @override */
33 didClosePage: function() { 36 didClosePage: function() {
34 settings.navigateTo(settings.Route.PEOPLE); 37 settings.navigateTo(settings.Route.PEOPLE);
35 }, 38 },
36 39
37 /** @override */ 40 /** @override */
38 didShowPage: function() { 41 didShowPage: function() {
39 settings.navigateTo(settings.Route.LOCK_SCREEN); 42 settings.navigateTo(settings.Route.LOCK_SCREEN);
40 var lockScreen = document.querySelector('settings-lock-screen'); 43 var lockScreen = document.querySelector('settings-lock-screen');
41 44
42 var checkbox = lockScreen.root.querySelector('settings-checkbox'); 45 var checkbox =
46 lockScreen.root.querySelector('div.settings-box.single-column');
43 checkbox.hidden = true; 47 checkbox.hidden = true;
44 48
45 var passwordPrompt = lockScreen.root. 49 var passwordPrompt = lockScreen.root.
46 querySelector('settings-password-prompt-dialog'); 50 querySelector('settings-password-prompt-dialog');
47 passwordPrompt.addEventListener('close', function() { 51 passwordPrompt.addEventListener('close', function() {
48 if (!lockScreen.setModes_) { 52 if (!lockScreen.setModes_) {
49 QuickUnlockConfigureOverlay.dismiss(); 53 QuickUnlockConfigureOverlay.dismiss();
50 } 54 }
51 }.bind(this)); 55 }.bind(this));
52 }, 56 },
53 57
54 }; 58 };
55 59
56 QuickUnlockConfigureOverlay.dismiss = function() { 60 QuickUnlockConfigureOverlay.dismiss = function() {
57 PageManager.closeOverlay(); 61 PageManager.closeOverlay();
58 }; 62 };
59 63
60 // Export 64 // Export
61 return { 65 return {
62 QuickUnlockConfigureOverlay: QuickUnlockConfigureOverlay 66 QuickUnlockConfigureOverlay: QuickUnlockConfigureOverlay
63 }; 67 };
64 }); 68 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/chromeos/quick_unlock_configure_overlay.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698