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

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

Issue 2413623004: MD Settings: allow changing to GTK+ theme on Linux (Closed)
Patch Set: rejigger tests Created 4 years, 2 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
index 8982f699f9482fa61294a407603031d9a798cc58..d5df59989eb0b908663ce655a966f38ccfdd6c32 100644
--- a/chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js
+++ b/chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js
@@ -8,15 +8,20 @@ cr.define('settings', function() {
AppearanceBrowserProxy.prototype = {
/**
- * @return {!Promise<boolean>} Whether the theme may be reset.
+ * @param {string} themeId
+ * @return {!Promise<!chrome.management.ExtensionInfo>} Theme info.
*/
- getResetThemeEnabled: assertNotReached,
+ getThemeInfo: assertNotReached,
<if expr="chromeos">
openWallpaperManager: assertNotReached,
</if>
- resetTheme: assertNotReached,
+ useDefaultTheme: assertNotReached,
+
+<if expr="is_linux and not chromeos">
+ useSystemTheme: assertNotReached,
+</if>
};
/**
@@ -29,8 +34,10 @@ cr.define('settings', function() {
AppearanceBrowserProxyImpl.prototype = {
/** @override */
- getResetThemeEnabled: function() {
- return cr.sendWithPromise('getResetThemeEnabled');
+ getThemeInfo: function(themeId) {
+ return new Promise(function(resolve) {
+ chrome.management.get(themeId, resolve);
+ });
},
<if expr="chromeos">
@@ -41,9 +48,16 @@ cr.define('settings', function() {
</if>
/** @override */
- resetTheme: function() {
- chrome.send('resetTheme');
+ useDefaultTheme: function() {
+ chrome.send('useDefaultTheme');
+ },
+
+<if expr="is_linux and not chromeos">
+ /** @override */
+ useSystemTheme: function() {
+ chrome.send('useSystemTheme');
},
+</if>
};
return {

Powered by Google App Engine
This is Rietveld 408576698