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

Side by Side Diff: chrome/browser/resources/chromeos/login/controller-pairing-screen.js

Issue 819633002: Rearanged imports of custom Polymer elements in OOBE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits. Created 6 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 /**
6 * @fileoverview controller pairing screen implementation.
7 */
8
9 login.createScreen('ControllerPairingScreen', 'controller-pairing', function() {
10 return {
11 decorate: function() {
12 this.children[0].decorate(this);
13 }
14 };
15 });
16
17 Polymer('pairing-device-list', (function() { 5 Polymer('pairing-device-list', (function() {
18 /** @const */ var ICON_COLORS = ['#F0B9CB', '#F0ACC3', '#F098B6', '#F084A9', 6 /** @const */ var ICON_COLORS = ['#F0B9CB', '#F0ACC3', '#F098B6', '#F084A9',
19 '#F06D99', '#F05287', '#F0467F', '#F03473', 7 '#F06D99', '#F05287', '#F0467F', '#F03473',
20 '#F01E65', '#F00051']; 8 '#F01E65', '#F00051'];
21 return { 9 return {
22 /* Returns pseudo-random color depending of hash of the |name|. */ 10 /* Returns pseudo-random color depending of hash of the |name|. */
23 colorByName: function(name) { 11 colorByName: function(name) {
24 var hash = 0; 12 var hash = 0;
25 for (var i = 0; i < name.length; ++i) 13 for (var i = 0; i < name.length; ++i)
26 hash = (name.charCodeAt(i) + 31 * hash) | 0; 14 hash = (name.charCodeAt(i) + 31 * hash) | 0;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 }, 69 },
82 70
83 onAuthCompleted_: function(credentials) { 71 onAuthCompleted_: function(credentials) {
84 this.context.set(CONTEXT_KEY_ACCOUNT_ID, credentials.email); 72 this.context.set(CONTEXT_KEY_ACCOUNT_ID, credentials.email);
85 this.commitContextChanges(); 73 this.commitContextChanges();
86 this.send(login.Screen.CALLBACK_USER_ACTED, ACTION_ENROLL); 74 this.send(login.Screen.CALLBACK_USER_ACTED, ACTION_ENROLL);
87 } 75 }
88 }; 76 };
89 })()); 77 })());
90 78
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698