OLD | NEW |
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 /** | 5 /** |
6 * @fileoverview Helper object and related behavior that encapsulate messaging | 6 * @fileoverview Helper object and related behavior that encapsulate messaging |
7 * between JS and C++ for creating/importing profiles in the user-manager page. | 7 * between JS and C++ for creating/importing profiles in the user-manager page. |
8 */ | 8 */ |
9 | 9 |
10 /** @typedef {{username: string, profilePath: string}} */ | 10 /** @typedef {{username: string, profilePath: string}} */ |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 * @param {string} profileIconUrl URL of the selected icon of the new | 68 * @param {string} profileIconUrl URL of the selected icon of the new |
69 * profile. | 69 * profile. |
70 * @param {boolean} createShortcut if true a desktop shortcut will be | 70 * @param {boolean} createShortcut if true a desktop shortcut will be |
71 * created. | 71 * created. |
72 * @param {boolean} isSupervised True if the new profile is supervised. | 72 * @param {boolean} isSupervised True if the new profile is supervised. |
73 * @param {string} supervisedUserId ID of the supervised user to be | 73 * @param {string} supervisedUserId ID of the supervised user to be |
74 * imported. | 74 * imported. |
75 * @param {string} custodianProfilePath Profile path of the custodian if | 75 * @param {string} custodianProfilePath Profile path of the custodian if |
76 * the new profile is supervised. | 76 * the new profile is supervised. |
77 */ | 77 */ |
78 createProfile: function(profileName, profileIconUrl, createShortcut, | 78 createProfile: function( |
79 isSupervised, supervisedUserId, custodianProfilePath) { | 79 profileName, profileIconUrl, createShortcut, isSupervised, |
| 80 supervisedUserId, custodianProfilePath) { |
80 assertNotReached(); | 81 assertNotReached(); |
81 }, | 82 }, |
82 | 83 |
83 /** | 84 /** |
84 * Cancels creation of the new profile. | 85 * Cancels creation of the new profile. |
85 */ | 86 */ |
86 cancelCreateProfile: function() { | 87 cancelCreateProfile: function() { |
87 assertNotReached(); | 88 assertNotReached(); |
88 }, | 89 }, |
89 | 90 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 launchGuestUser: function() { | 171 launchGuestUser: function() { |
171 chrome.send('launchGuest'); | 172 chrome.send('launchGuest'); |
172 }, | 173 }, |
173 | 174 |
174 /** @override */ | 175 /** @override */ |
175 getExistingSupervisedUsers: function(profilePath) { | 176 getExistingSupervisedUsers: function(profilePath) { |
176 return cr.sendWithPromise('getExistingSupervisedUsers', profilePath); | 177 return cr.sendWithPromise('getExistingSupervisedUsers', profilePath); |
177 }, | 178 }, |
178 | 179 |
179 /** @override */ | 180 /** @override */ |
180 createProfile: function(profileName, profileIconUrl, createShortcut, | 181 createProfile: function( |
181 isSupervised, supervisedUserId, custodianProfilePath) { | 182 profileName, profileIconUrl, createShortcut, isSupervised, |
182 chrome.send('createProfile', | 183 supervisedUserId, custodianProfilePath) { |
183 [profileName, profileIconUrl, createShortcut, isSupervised, | 184 chrome.send('createProfile', [ |
184 supervisedUserId, custodianProfilePath]); | 185 profileName, profileIconUrl, createShortcut, isSupervised, |
| 186 supervisedUserId, custodianProfilePath |
| 187 ]); |
185 }, | 188 }, |
186 | 189 |
187 /** @override */ | 190 /** @override */ |
188 cancelCreateProfile: function() { | 191 cancelCreateProfile: function() { |
189 chrome.send('cancelCreateProfile'); | 192 chrome.send('cancelCreateProfile'); |
190 }, | 193 }, |
191 | 194 |
192 /** @override */ | 195 /** @override */ |
193 cancelLoadingSupervisedUsers: function() { | 196 cancelLoadingSupervisedUsers: function() { |
194 chrome.send('cancelLoadingSupervisedUsers'); | 197 chrome.send('cancelLoadingSupervisedUsers'); |
(...skipping 28 matching lines...) Expand all Loading... |
223 authenticateCustodian: function(emailAddress) { | 226 authenticateCustodian: function(emailAddress) { |
224 chrome.send('authenticateCustodian', [emailAddress]); | 227 chrome.send('authenticateCustodian', [emailAddress]); |
225 } | 228 } |
226 }; | 229 }; |
227 | 230 |
228 return { | 231 return { |
229 ProfileBrowserProxy: ProfileBrowserProxy, | 232 ProfileBrowserProxy: ProfileBrowserProxy, |
230 ProfileBrowserProxyImpl: ProfileBrowserProxyImpl, | 233 ProfileBrowserProxyImpl: ProfileBrowserProxyImpl, |
231 }; | 234 }; |
232 }); | 235 }); |
OLD | NEW |