Index: chrome/browser/resources/options/personal_options.js |
diff --git a/chrome/browser/resources/options/personal_options.js b/chrome/browser/resources/options/personal_options.js |
index cdc8958d8068ad29303d15baf9200b2332ab3277..4279858f04da85f8d78016616f11326e6fe9473b 100644 |
--- a/chrome/browser/resources/options/personal_options.js |
+++ b/chrome/browser/resources/options/personal_options.js |
@@ -40,10 +40,6 @@ cr.define('options', function() { |
else |
self.showSyncLoginDialog_(); |
}; |
- $('privacy-dashboard-link').onclick = function(event) { |
- chrome.send('openPrivacyDashboardTabAndActivate'); |
- }; |
- |
$('showpasswords').onclick = function(event) { |
PasswordsExceptions.load(); |
OptionsPage.showPageByName('passwordsExceptions'); |
@@ -51,7 +47,6 @@ cr.define('options', function() { |
chrome.send('coreOptionsUserMetricsAction', |
['Options_ShowPasswordsExceptions']); |
}; |
- |
$('autofill_options').onclick = function(event) { |
OptionsPage.showPageByName('autoFillOptions'); |
chrome.send('coreOptionsUserMetricsAction', |
@@ -69,27 +64,22 @@ cr.define('options', function() { |
$('themes_GTK_button').onclick = function(event) { |
chrome.send('themesSetGTK'); |
}; |
- |
$('themes_set_classic').onclick = function(event) { |
chrome.send('themesReset'); |
}; |
- $('themes-gallery').onclick = function(event) { |
- chrome.send('themesGallery'); |
- } |
} |
if (cr.isMac || cr.isWindows || cr.isChromeOS) { |
$('themes_reset').onclick = function(event) { |
chrome.send('themesReset'); |
}; |
- $('themes-gallery').onclick = function(event) { |
- chrome.send('themesGallery'); |
- } |
} |
if (cr.isChromeOS) { |
chrome.send('loadAccountPicture'); |
} |
+ |
+ self.requestThemesGalleryURL_(); |
}, |
showStopSyncingOverlay_: function(event) { |
@@ -105,6 +95,10 @@ cr.define('options', function() { |
chrome.send('showSyncLoginDialog'); |
}, |
+ requestThemesGalleryURL_: function() { |
+ chrome.send('getThemesGalleryURL'); |
+ }, |
+ |
setElementVisible_: function(element, visible) { |
element.style.display = visible ? 'inline' : 'none'; |
}, |
@@ -185,6 +179,11 @@ cr.define('options', function() { |
$('themes_set_classic').disabled = !enabled; |
} |
}, |
+ |
+ setThemesGalleryURL_: function(url) { |
+ $('themes-gallery').href = url; |
+ $('themes-gallery').target = '_blank'; // Open in a new tab. |
arv (Not doing code reviews)
2010/11/12 01:17:25
Can you link to a webkit bug here?
James Hawkins
2010/11/12 23:47:20
I've actually removed this piece of code. Do you w
|
+ }, |
}; |
// Forward public APIs to private implementations. |
@@ -205,6 +204,7 @@ cr.define('options', function() { |
'setCustomizeButtonLabel', |
'setGtkThemeButtonEnabled', |
'setClassicThemeButtonEnabled', |
+ 'setThemesGalleryURL', |
].forEach(function(name) { |
PersonalOptions[name] = function(value) { |
PersonalOptions.getInstance()[name + '_'](value); |