$i18n{appearanceSettingsBraveTheme}
-
+
+
diff --git a/browser/resources/settings/brave_appearance_page/brave_appearance_page.js b/browser/resources/settings/brave_appearance_page/brave_appearance_page.js
index 8467c9221c59..c6bacd28d9ee 100644
--- a/browser/resources/settings/brave_appearance_page/brave_appearance_page.js
+++ b/browser/resources/settings/brave_appearance_page/brave_appearance_page.js
@@ -9,15 +9,7 @@ Polymer({
is: 'settings-brave-appearance-theme',
properties: {
- braveThemeTypes_: {
- readOnly: true,
- type: Array,
- value: [
- 'Light',
- 'Dark',
- ],
- },
- braveThemeType_: String,
+ braveThemeList_: [],
},
/** @private {?settings.BraveAppearanceBrowserProxy} */
@@ -30,24 +22,10 @@ Polymer({
/** @override */
ready: function() {
- this.browserProxy_.getBraveThemeType().then(theme => {
- this.braveThemeType_ = theme;
+ this.browserProxy_.getBraveThemeList().then(list => {
+ this.braveThemeList_ = JSON.parse(list);
});
},
-
- /**
- * @param {string} theme1
- * @param {string} theme2
- * @return {boolean}
- * @private
- */
- braveThemeTypeEqual_: function(theme1, theme2) {
- return theme1 === theme2;
- },
-
- onBraveThemeTypeChange_: function() {
- this.browserProxy_.setBraveThemeType(this.$.braveThemeType.value);
- },
});
/**
diff --git a/browser/themes/BUILD.gn b/browser/themes/BUILD.gn
index 8194ec3b7715..c11f65b40160 100644
--- a/browser/themes/BUILD.gn
+++ b/browser/themes/BUILD.gn
@@ -4,6 +4,10 @@ source_set("themes") {
"brave_theme_service.h",
"brave_theme_service_win.cc",
"brave_theme_service_win.h",
+ "brave_theme_utils.h",
+ "brave_theme_utils_linux.cc",
+ "brave_theme_utils_mac.mm",
+ "brave_theme_utils_win.cc",
"theme_properties.cc",
"theme_properties.h",
]
diff --git a/browser/themes/brave_theme_service.cc b/browser/themes/brave_theme_service.cc
index e21cd0a22956..2b0c72c86ade 100644
--- a/browser/themes/brave_theme_service.cc
+++ b/browser/themes/brave_theme_service.cc
@@ -1,33 +1,98 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
+/* Copyright (c) 2019 The Brave Authors. All rights reserved.
+ * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "brave/browser/themes/brave_theme_service.h"
+#include