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 /** | 33 /** |
34 * @implements {settings.AppearanceBrowserProxy} | 34 * @implements {settings.AppearanceBrowserProxy} |
35 * @constructor | 35 * @constructor |
36 */ | 36 */ |
37 function AppearanceBrowserProxyImpl() {} | 37 function AppearanceBrowserProxyImpl() {} |
38 | 38 |
39 cr.addSingletonGetter(AppearanceBrowserProxyImpl); | 39 cr.addSingletonGetter(AppearanceBrowserProxyImpl); |
40 | 40 |
(...skipping 10 matching lines...) Expand all Loading... |
51 return new Promise(function(resolve) { | 51 return new Promise(function(resolve) { |
52 chrome.management.get(themeId, resolve); | 52 chrome.management.get(themeId, resolve); |
53 }); | 53 }); |
54 }, | 54 }, |
55 | 55 |
56 /** @override */ | 56 /** @override */ |
57 isSupervised: function() { | 57 isSupervised: function() { |
58 return loadTimeData.getBoolean('isSupervised'); | 58 return loadTimeData.getBoolean('isSupervised'); |
59 }, | 59 }, |
60 | 60 |
61 <if expr="chromeos"> | 61 // <if expr="chromeos"> |
62 /** @override */ | 62 /** @override */ |
63 openWallpaperManager: function() { | 63 openWallpaperManager: function() { |
64 chrome.send('openWallpaperManager'); | 64 chrome.send('openWallpaperManager'); |
65 }, | 65 }, |
66 </if> | 66 // </if> |
67 | 67 |
68 /** @override */ | 68 /** @override */ |
69 useDefaultTheme: function() { | 69 useDefaultTheme: function() { |
70 chrome.send('useDefaultTheme'); | 70 chrome.send('useDefaultTheme'); |
71 }, | 71 }, |
72 | 72 |
73 <if expr="is_linux and not chromeos"> | 73 // <if expr="is_linux and not chromeos"> |
74 /** @override */ | 74 /** @override */ |
75 useSystemTheme: function() { | 75 useSystemTheme: function() { |
76 chrome.send('useSystemTheme'); | 76 chrome.send('useSystemTheme'); |
77 }, | 77 }, |
78 </if> | 78 // </if> |
79 }; | 79 }; |
80 | 80 |
81 return { | 81 return { |
82 AppearanceBrowserProxy: AppearanceBrowserProxy, | 82 AppearanceBrowserProxy: AppearanceBrowserProxy, |
83 AppearanceBrowserProxyImpl: AppearanceBrowserProxyImpl, | 83 AppearanceBrowserProxyImpl: AppearanceBrowserProxyImpl, |
84 }; | 84 }; |
85 }); | 85 }); |
OLD | NEW |