| 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 cr.define('settings', function() { | 5 cr.define('settings', function() { |
| 6 /** @interface */ | 6 /** @interface */ |
| 7 function AppearanceBrowserProxy() {} | 7 function AppearanceBrowserProxy() {} |
| 8 | 8 |
| 9 AppearanceBrowserProxy.prototype = { | 9 AppearanceBrowserProxy.prototype = { |
| 10 /** @return {!Promise<number>} */ |
| 11 getDefaultZoom: assertNotReached, |
| 12 |
| 10 /** | 13 /** |
| 11 * @param {string} themeId | 14 * @param {string} themeId |
| 12 * @return {!Promise<!chrome.management.ExtensionInfo>} Theme info. | 15 * @return {!Promise<!chrome.management.ExtensionInfo>} Theme info. |
| 13 */ | 16 */ |
| 14 getThemeInfo: assertNotReached, | 17 getThemeInfo: assertNotReached, |
| 15 | 18 |
| 16 /** @return {boolean} Whether the current profile is supervised. */ | 19 /** @return {boolean} Whether the current profile is supervised. */ |
| 17 isSupervised: assertNotReached, | 20 isSupervised: assertNotReached, |
| 18 | 21 |
| 19 <if expr="chromeos"> | 22 <if expr="chromeos"> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 30 /** | 33 /** |
| 31 * @implements {settings.AppearanceBrowserProxy} | 34 * @implements {settings.AppearanceBrowserProxy} |
| 32 * @constructor | 35 * @constructor |
| 33 */ | 36 */ |
| 34 function AppearanceBrowserProxyImpl() {} | 37 function AppearanceBrowserProxyImpl() {} |
| 35 | 38 |
| 36 cr.addSingletonGetter(AppearanceBrowserProxyImpl); | 39 cr.addSingletonGetter(AppearanceBrowserProxyImpl); |
| 37 | 40 |
| 38 AppearanceBrowserProxyImpl.prototype = { | 41 AppearanceBrowserProxyImpl.prototype = { |
| 39 /** @override */ | 42 /** @override */ |
| 43 getDefaultZoom: function() { |
| 44 return new Promise(function(resolve) { |
| 45 chrome.settingsPrivate.getDefaultZoom(resolve); |
| 46 }); |
| 47 }, |
| 48 |
| 49 /** @override */ |
| 40 getThemeInfo: function(themeId) { | 50 getThemeInfo: function(themeId) { |
| 41 return new Promise(function(resolve) { | 51 return new Promise(function(resolve) { |
| 42 chrome.management.get(themeId, resolve); | 52 chrome.management.get(themeId, resolve); |
| 43 }); | 53 }); |
| 44 }, | 54 }, |
| 45 | 55 |
| 46 /** @override */ | 56 /** @override */ |
| 47 isSupervised: function() { | 57 isSupervised: function() { |
| 48 return loadTimeData.getBoolean('isSupervised'); | 58 return loadTimeData.getBoolean('isSupervised'); |
| 49 }, | 59 }, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 66 chrome.send('useSystemTheme'); | 76 chrome.send('useSystemTheme'); |
| 67 }, | 77 }, |
| 68 </if> | 78 </if> |
| 69 }; | 79 }; |
| 70 | 80 |
| 71 return { | 81 return { |
| 72 AppearanceBrowserProxy: AppearanceBrowserProxy, | 82 AppearanceBrowserProxy: AppearanceBrowserProxy, |
| 73 AppearanceBrowserProxyImpl: AppearanceBrowserProxyImpl, | 83 AppearanceBrowserProxyImpl: AppearanceBrowserProxyImpl, |
| 74 }; | 84 }; |
| 75 }); | 85 }); |
| OLD | NEW |