Index: chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js |
diff --git a/chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js b/chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..54aa9af269aa410b491074cc9b808f733ce23554 |
--- /dev/null |
+++ b/chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js |
@@ -0,0 +1,56 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+cr.define('settings', function() { |
+ /** @interface */ |
+ function AppearanceBrowserProxy() {} |
+ |
+ AppearanceBrowserProxy.prototype = { |
+ /** |
+ * @return {!Promise<boolean>} Whether the theme may be reset. |
+ */ |
+ getResetThemeEnabled: assertNotReached, |
+ |
+<if expr="chromeos"> |
+ /** |
+ * ChromeOS only. |
dpapad
2016/04/20 01:16:58
Nit(optional): You can remove the comment now, sin
dschuyler
2016/04/20 19:15:45
Done.
|
+ */ |
+ openWallpaperManager: assertNotReached, |
+</if> |
+ |
+ resetTheme: assertNotReached, |
+ }; |
+ |
+ /** |
+ * @implements {settings.AppearanceBrowserProxy} |
+ * @constructor |
+ */ |
+ function AppearanceBrowserProxyImpl() {} |
+ |
+ cr.addSingletonGetter(AppearanceBrowserProxyImpl); |
+ |
+ AppearanceBrowserProxyImpl.prototype = { |
+ /** @override */ |
+ getResetThemeEnabled: function() { |
+ return cr.sendWithPromise('getResetThemeEnabled'); |
+ }, |
+ |
+<if expr="chromeos"> |
+ /** @override */ |
+ openWallpaperManager: function() { |
+ chrome.send('openWallpaperManager'); |
+ }, |
+ |
+ /** @override */ |
+ resetTheme: function() { |
+ chrome.send('resetTheme'); |
+ }, |
+</if> |
+ }; |
+ |
+ return { |
+ AppearanceBrowserProxy: AppearanceBrowserProxy, |
+ AppearanceBrowserProxyImpl: AppearanceBrowserProxyImpl, |
+ }; |
+}); |