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 cr.define('settings', function() { |
| 6 /** @interface */ |
| 7 function AppearanceBrowserProxy() {} |
| 8 |
| 9 AppearanceBrowserProxy.prototype = { |
| 10 /** |
| 11 * @return {!Promise<boolean>} Whether the theme may be reset. |
| 12 */ |
| 13 getResetThemeEnabled: assertNotReached, |
| 14 |
| 15 <if expr="chromeos"> |
| 16 openWallpaperManager: assertNotReached, |
| 17 </if> |
| 18 |
| 19 resetTheme: assertNotReached, |
| 20 }; |
| 21 |
| 22 /** |
| 23 * @implements {settings.AppearanceBrowserProxy} |
| 24 * @constructor |
| 25 */ |
| 26 function AppearanceBrowserProxyImpl() {} |
| 27 |
| 28 cr.addSingletonGetter(AppearanceBrowserProxyImpl); |
| 29 |
| 30 AppearanceBrowserProxyImpl.prototype = { |
| 31 /** @override */ |
| 32 getResetThemeEnabled: function() { |
| 33 return cr.sendWithPromise('getResetThemeEnabled'); |
| 34 }, |
| 35 |
| 36 <if expr="chromeos"> |
| 37 /** @override */ |
| 38 openWallpaperManager: function() { |
| 39 chrome.send('openWallpaperManager'); |
| 40 }, |
| 41 </if> |
| 42 |
| 43 /** @override */ |
| 44 resetTheme: function() { |
| 45 chrome.send('resetTheme'); |
| 46 }, |
| 47 }; |
| 48 |
| 49 return { |
| 50 AppearanceBrowserProxy: AppearanceBrowserProxy, |
| 51 AppearanceBrowserProxyImpl: AppearanceBrowserProxyImpl, |
| 52 }; |
| 53 }); |
OLD | NEW |