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

Side by Side Diff: chrome/browser/resources/signin/signin_error/signin_error.js

Issue 2351173004: Display local signin error without browser and record the path of selected profile in user manager. (Closed)
Patch Set: cr Created 4 years, 2 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
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('signin.error', function() { 5 cr.define('signin.error', function() {
6 'use strict'; 6 'use strict';
7 7
8 function initialize() { 8 function initialize() {
9 document.addEventListener('keydown', onKeyDown); 9 document.addEventListener('keydown', onKeyDown);
10 $('confirmButton').addEventListener('click', onConfirm); 10 $('confirmButton').addEventListener('click', onConfirm);
11 $('closeButton').addEventListener('click', onConfirm); 11 $('closeButton').addEventListener('click', onConfirm);
12 $('switchButton').addEventListener('click', onSwitchToExistingProfile); 12 $('switchButton').addEventListener('click', onSwitchToExistingProfile);
13 $('learnMoreLink').addEventListener('click', onLearnMore); 13 $('learnMoreLink').addEventListener('click', onLearnMore);
14 if (loadTimeData.getBoolean('isSystemProfile')) {
15 $('learnMoreLink').hidden = true;
16 }
14 chrome.send('initializedWithSize', [document.body.scrollHeight]); 17 chrome.send('initializedWithSize', [document.body.scrollHeight]);
15 } 18 }
16 19
17 function onKeyDown(e) { 20 function onKeyDown(e) {
18 // If the currently focused element isn't something that performs an action 21 // If the currently focused element isn't something that performs an action
19 // on "enter" being pressed and the user hits "enter", perform the default 22 // on "enter" being pressed and the user hits "enter", perform the default
20 // action of the dialog, which is "OK". 23 // action of the dialog, which is "OK".
21 if (e.key == 'Enter' && 24 if (e.key == 'Enter' &&
22 !/^(A|PAPER-BUTTON)$/.test(document.activeElement.tagName)) { 25 !/^(A|PAPER-BUTTON)$/.test(document.activeElement.tagName)) {
23 $('confirmButton').click(); 26 $('confirmButton').click();
(...skipping 24 matching lines...) Expand all
48 } 51 }
49 52
50 return { 53 return {
51 initialize: initialize, 54 initialize: initialize,
52 clearFocus: clearFocus, 55 clearFocus: clearFocus,
53 removeSwitchButton: removeSwitchButton 56 removeSwitchButton: removeSwitchButton
54 }; 57 };
55 }); 58 });
56 59
57 document.addEventListener('DOMContentLoaded', signin.error.initialize); 60 document.addEventListener('DOMContentLoaded', signin.error.initialize);
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/user_manager.h » ('j') | chrome/browser/ui/views/profiles/user_manager_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698