| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 /** |
| 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 |
| 8 * Chrome browser and ChromeOS. |
| 9 */ |
| 10 cr.exportPath('settings'); |
| 11 |
| 12 /** |
| 13 * An object describing the profile. |
| 14 * @typedef {{ |
| 15 * name: string, |
| 16 * iconUrl: string |
| 17 * }} |
| 18 */ |
| 19 settings.ProfileInfo; |
| 20 |
| 21 cr.define('settings', function() { |
| 22 /** @interface */ |
| 23 function ProfileInfoBrowserProxy() {} |
| 24 |
| 25 ProfileInfoBrowserProxy.prototype = { |
| 26 /** |
| 27 * Returns a Promise for the profile info. |
| 28 * @return {!Promise<!settings.ProfileInfo>} |
| 29 */ |
| 30 getProfileInfo: function() {}, |
| 31 }; |
| 32 |
| 33 /** |
| 34 * @constructor |
| 35 * @implements {ProfileInfoBrowserProxy} |
| 36 */ |
| 37 function ProfileInfoBrowserProxyImpl() {} |
| 38 cr.addSingletonGetter(ProfileInfoBrowserProxyImpl); |
| 39 |
| 40 ProfileInfoBrowserProxyImpl.prototype = { |
| 41 /** @override */ |
| 42 getProfileInfo: function() { |
| 43 return cr.sendWithPromise('getProfileInfo'); |
| 44 }, |
| 45 }; |
| 46 |
| 47 return { |
| 48 ProfileInfoBrowserProxyImpl: ProfileInfoBrowserProxyImpl, |
| 49 }; |
| 50 }); |
| OLD | NEW |