Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js

Issue 1896283003: [MD settings] appearance theme and wallpaper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: param comments Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..0579f22fdc2876f4b8dba39c0fbe8f6db61976c0
--- /dev/null
+++ b/chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js
@@ -0,0 +1,52 @@
+// 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} Whether the theme may be reset.
dpapad 2016/04/19 23:32:40 !Promise<boolean>
dschuyler 2016/04/20 00:19:06 Done.
+ */
+ getResetThemeEnabled: assertNotReached,
+
+ /**
+ * ChromeOS only.
+ */
+ 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.
+
+ resetTheme: assertNotReached,
+ };
+
+ /**
+ * @implements {settings.AppearanceBrowserProxy}
+ * @constructor
+ */
+ function AppearanceBrowserProxyImpl() {}
+
+ cr.addSingletonGetter(AppearanceBrowserProxyImpl);
+
+ AppearanceBrowserProxyImpl.prototype = {
+ /** @override */
+ getResetThemeEnabled: function() {
+ return cr.sendWithPromise('getResetThemeEnabled');
+ },
+
+ /** @override */
+ openWallpaperManager: function() {
+ chrome.send('openWallpaperManager');
+ },
+
+ /** @override */
+ resetTheme: function() {
+ chrome.send('resetTheme');
+ },
+ };
+
+ return {
+ AppearanceBrowserProxy: AppearanceBrowserProxy,
+ AppearanceBrowserProxyImpl: AppearanceBrowserProxyImpl,
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698