| 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 A helper object used from the the People section to get the | 6 * @fileoverview A helper object used from the the People section to get the |
| 7 * profile info, which consists of the profile name and icon. Used for both | 7 * profile info, which consists of the profile name and icon. Used for both |
| 8 * Chrome browser and ChromeOS. | 8 * Chrome browser and ChromeOS. |
| 9 */ | 9 */ |
| 10 cr.exportPath('settings'); | 10 cr.exportPath('settings'); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 cr.define('settings', function() { | 21 cr.define('settings', function() { |
| 22 /** @interface */ | 22 /** @interface */ |
| 23 function ProfileInfoBrowserProxy() {} | 23 function ProfileInfoBrowserProxy() {} |
| 24 | 24 |
| 25 ProfileInfoBrowserProxy.prototype = { | 25 ProfileInfoBrowserProxy.prototype = { |
| 26 /** | 26 /** |
| 27 * Returns a Promise for the profile info. | 27 * Returns a Promise for the profile info. |
| 28 * @return {!Promise<!settings.ProfileInfo>} | 28 * @return {!Promise<!settings.ProfileInfo>} |
| 29 */ | 29 */ |
| 30 getProfileInfo: function() {}, | 30 getProfileInfo: function() {}, |
| 31 |
| 32 /** |
| 33 * Returns a Promise that's true if the profile manages supervised users. |
| 34 * @return {!Promise<boolean>} |
| 35 */ |
| 36 getProfileManagesSupervisedUsers() {}, |
| 31 }; | 37 }; |
| 32 | 38 |
| 33 /** | 39 /** |
| 34 * @constructor | 40 * @constructor |
| 35 * @implements {ProfileInfoBrowserProxy} | 41 * @implements {ProfileInfoBrowserProxy} |
| 36 */ | 42 */ |
| 37 function ProfileInfoBrowserProxyImpl() {} | 43 function ProfileInfoBrowserProxyImpl() {} |
| 38 cr.addSingletonGetter(ProfileInfoBrowserProxyImpl); | 44 cr.addSingletonGetter(ProfileInfoBrowserProxyImpl); |
| 39 | 45 |
| 40 ProfileInfoBrowserProxyImpl.prototype = { | 46 ProfileInfoBrowserProxyImpl.prototype = { |
| 41 /** @override */ | 47 /** @override */ |
| 42 getProfileInfo: function() { | 48 getProfileInfo: function() { |
| 43 return cr.sendWithPromise('getProfileInfo'); | 49 return cr.sendWithPromise('getProfileInfo'); |
| 44 }, | 50 }, |
| 51 |
| 52 /** @override */ |
| 53 getProfileManagesSupervisedUsers() { |
| 54 return cr.sendWithPromise('getProfileManagesSupervisedUsers'); |
| 55 }, |
| 45 }; | 56 }; |
| 46 | 57 |
| 47 return { | 58 return { |
| 48 ProfileInfoBrowserProxyImpl: ProfileInfoBrowserProxyImpl, | 59 ProfileInfoBrowserProxyImpl: ProfileInfoBrowserProxyImpl, |
| 49 }; | 60 }; |
| 50 }); | 61 }); |
| OLD | NEW |