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} Whether the theme may be reset. | |
dpapad
2016/04/19 23:32:40
!Promise<boolean>
dschuyler
2016/04/20 00:19:06
Done.
| |
12 */ | |
13 getResetThemeEnabled: assertNotReached, | |
14 | |
15 /** | |
16 * ChromeOS only. | |
17 */ | |
18 openWallpaperManager: assertNotReached, | |
dpapad
2016/04/19 23:32:40
Can you wrap this (and the implementation below) w
dschuyler
2016/04/20 00:19:06
Done.
| |
19 | |
20 resetTheme: assertNotReached, | |
21 }; | |
22 | |
23 /** | |
24 * @implements {settings.AppearanceBrowserProxy} | |
25 * @constructor | |
26 */ | |
27 function AppearanceBrowserProxyImpl() {} | |
28 | |
29 cr.addSingletonGetter(AppearanceBrowserProxyImpl); | |
30 | |
31 AppearanceBrowserProxyImpl.prototype = { | |
32 /** @override */ | |
33 getResetThemeEnabled: function() { | |
34 return cr.sendWithPromise('getResetThemeEnabled'); | |
35 }, | |
36 | |
37 /** @override */ | |
38 openWallpaperManager: function() { | |
39 chrome.send('openWallpaperManager'); | |
40 }, | |
41 | |
42 /** @override */ | |
43 resetTheme: function() { | |
44 chrome.send('resetTheme'); | |
45 }, | |
46 }; | |
47 | |
48 return { | |
49 AppearanceBrowserProxy: AppearanceBrowserProxy, | |
50 AppearanceBrowserProxyImpl: AppearanceBrowserProxyImpl, | |
51 }; | |
52 }); | |
OLD | NEW |