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

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

Issue 2414213002: MD Settings: use theme homepage URLs when set (Closed)
Patch Set: ensure always CWS 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
« no previous file with comments | « chrome/browser/resources/settings/appearance_page/appearance_page.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/appearance_page/appearance_page.js
diff --git a/chrome/browser/resources/settings/appearance_page/appearance_page.js b/chrome/browser/resources/settings/appearance_page/appearance_page.js
index c9c8094d1dbee25e0d589c02bc9522ffc3c53637..7e0661d84332362a128b891145cb4aff12e4f664 100644
--- a/chrome/browser/resources/settings/appearance_page/appearance_page.js
+++ b/chrome/browser/resources/settings/appearance_page/appearance_page.js
@@ -101,6 +101,9 @@ Polymer({
pageVisibility: Object,
},
+ /** @private {string} */
+ themeUrl_: '',
+
observers: [
'themeChanged_(prefs.extensions.theme.id.value, useSystemTheme_)',
@@ -143,10 +146,8 @@ Polymer({
},
/** @private */
- openThemesGallery_: function() {
- // TODO(dbeam): open the theme detail page when a custom theme is installed
- // (or otherwise handle the [//] open in new icon in a better way).
- window.open(loadTimeData.getString('themesGalleryUrl'));
+ onThemesTap_: function() {
+ window.open(this.themeUrl_ || loadTimeData.getString('themesGalleryUrl'));
},
<if expr="chromeos">
@@ -207,9 +208,12 @@ Polymer({
themeChanged_: function(themeId, useSystemTheme) {
if (themeId) {
assert(!useSystemTheme);
+
this.browserProxy_.getThemeInfo(themeId).then(function(info) {
this.themeSublabel_ = info.name;
}.bind(this));
+
+ this.themeUrl_ = `https://chrome.google.com/webstore/detail/${themeId}`;
return;
}
@@ -221,6 +225,7 @@ Polymer({
i18nId = 'chooseFromWebStore';
</if>
this.themeSublabel_ = this.i18n(i18nId);
+ this.themeUrl_ = '';
},
/**
« no previous file with comments | « chrome/browser/resources/settings/appearance_page/appearance_page.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698