| 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>} */ | 10 /** @return {!Promise<number>} */ |
| 11 getDefaultZoom: assertNotReached, | 11 getDefaultZoom: assertNotReached, |
| 12 | 12 |
| 13 /** | 13 /** |
| 14 * @param {string} themeId | 14 * @param {string} themeId |
| 15 * @return {!Promise<!chrome.management.ExtensionInfo>} Theme info. | 15 * @return {!Promise<!chrome.management.ExtensionInfo>} Theme info. |
| 16 */ | 16 */ |
| 17 getThemeInfo: assertNotReached, | 17 getThemeInfo: assertNotReached, |
| 18 | 18 |
| 19 /** @return {boolean} Whether the current profile is supervised. */ | 19 /** @return {boolean} Whether the current profile is supervised. */ |
| 20 isSupervised: assertNotReached, | 20 isSupervised: assertNotReached, |
| 21 | 21 |
| 22 // <if expr="chromeos"> | 22 // <if expr="chromeos"> |
| 23 openWallpaperManager: assertNotReached, | 23 openWallpaperManager: assertNotReached, |
| 24 // </if> | 24 // </if> |
| 25 | 25 |
| 26 useDefaultTheme: assertNotReached, | 26 useDefaultTheme: assertNotReached, |
| 27 | 27 |
| 28 // <if expr="is_linux and not chromeos"> | 28 // <if expr="is_linux and not chromeos"> |
| 29 useSystemTheme: assertNotReached, | 29 useSystemTheme: assertNotReached, |
| 30 // </if> | 30 // </if> |
| 31 | 31 |
| 32 /** | 32 /** |
| 33 * @param {string} url The url of which to check validity. | 33 * @param {string} url The url of which to check validity. |
| 34 * @return {!Promise<boolean>} | 34 * @return {!Promise<boolean>} |
| 35 */ | 35 */ |
| 36 validateStartupPage: assertNotReached, | 36 validateStartupPage: assertNotReached, |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 /** | 39 /** |
| 40 * @implements {settings.AppearanceBrowserProxy} | 40 * @implements {settings.AppearanceBrowserProxy} |
| (...skipping 16 matching lines...) Expand all Loading... |
| 57 return new Promise(function(resolve) { | 57 return new Promise(function(resolve) { |
| 58 chrome.management.get(themeId, resolve); | 58 chrome.management.get(themeId, resolve); |
| 59 }); | 59 }); |
| 60 }, | 60 }, |
| 61 | 61 |
| 62 /** @override */ | 62 /** @override */ |
| 63 isSupervised: function() { | 63 isSupervised: function() { |
| 64 return loadTimeData.getBoolean('isSupervised'); | 64 return loadTimeData.getBoolean('isSupervised'); |
| 65 }, | 65 }, |
| 66 | 66 |
| 67 // <if expr="chromeos"> | 67 // <if expr="chromeos"> |
| 68 /** @override */ | 68 /** @override */ |
| 69 openWallpaperManager: function() { | 69 openWallpaperManager: function() { |
| 70 chrome.send('openWallpaperManager'); | 70 chrome.send('openWallpaperManager'); |
| 71 }, | 71 }, |
| 72 // </if> | 72 // </if> |
| 73 | 73 |
| 74 /** @override */ | 74 /** @override */ |
| 75 useDefaultTheme: function() { | 75 useDefaultTheme: function() { |
| 76 chrome.send('useDefaultTheme'); | 76 chrome.send('useDefaultTheme'); |
| 77 }, | 77 }, |
| 78 | 78 |
| 79 // <if expr="is_linux and not chromeos"> | 79 // <if expr="is_linux and not chromeos"> |
| 80 /** @override */ | 80 /** @override */ |
| 81 useSystemTheme: function() { | 81 useSystemTheme: function() { |
| 82 chrome.send('useSystemTheme'); | 82 chrome.send('useSystemTheme'); |
| 83 }, | 83 }, |
| 84 // </if> | 84 // </if> |
| 85 | 85 |
| 86 /** @override */ | 86 /** @override */ |
| 87 validateStartupPage: function(url) { | 87 validateStartupPage: function(url) { |
| 88 return cr.sendWithPromise('validateStartupPage', url); | 88 return cr.sendWithPromise('validateStartupPage', url); |
| 89 }, | 89 }, |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 return { | 92 return { |
| 93 AppearanceBrowserProxy: AppearanceBrowserProxy, | 93 AppearanceBrowserProxy: AppearanceBrowserProxy, |
| 94 AppearanceBrowserProxyImpl: AppearanceBrowserProxyImpl, | 94 AppearanceBrowserProxyImpl: AppearanceBrowserProxyImpl, |
| 95 }; | 95 }; |
| 96 }); | 96 }); |
| OLD | NEW |