Index: chrome/browser/dom_ui/options/personal_options_handler.cc |
diff --git a/chrome/browser/dom_ui/options/personal_options_handler.cc b/chrome/browser/dom_ui/options/personal_options_handler.cc |
index 4c776b9af030e6f7371a9e2d631edc8d3fc735ae..b6503f3703da0bad38b0eb9c84b20da9da4b8b9e 100644 |
--- a/chrome/browser/dom_ui/options/personal_options_handler.cc |
+++ b/chrome/browser/dom_ui/options/personal_options_handler.cc |
@@ -120,15 +120,11 @@ void PersonalOptionsHandler::RegisterMessages() { |
"showSyncLoginDialog", |
NewCallback(this, &PersonalOptionsHandler::ShowSyncLoginDialog)); |
dom_ui_->RegisterMessageCallback( |
- "openPrivacyDashboardTabAndActivate", |
- NewCallback(this, |
- &PersonalOptionsHandler::OpenPrivacyDashboardTabAndActivate)); |
- dom_ui_->RegisterMessageCallback( |
"themesReset", |
NewCallback(this, &PersonalOptionsHandler::ThemesReset)); |
dom_ui_->RegisterMessageCallback( |
- "themesGallery", |
- NewCallback(this, &PersonalOptionsHandler::ThemesGallery)); |
+ "getThemesGalleryURL", |
arv (Not doing code reviews)
2010/11/12 01:17:25
Is there a reason why this cannot be included in t
James Hawkins
2010/11/12 21:15:29
I tried using that construct and it didn't work.
James Hawkins
2010/11/12 23:47:20
Done.
|
+ NewCallback(this, &PersonalOptionsHandler::GetThemesGalleryURL)); |
#if defined(TOOLKIT_GTK) |
dom_ui_->RegisterMessageCallback( |
"themesSetGTK", |
@@ -279,19 +275,15 @@ void PersonalOptionsHandler::ShowSyncLoginDialog(const ListValue* args) { |
ProfileSyncService::SyncEvent(ProfileSyncService::START_FROM_OPTIONS); |
} |
-void PersonalOptionsHandler::OpenPrivacyDashboardTabAndActivate( |
- const ListValue* args) { |
- BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate(); |
-} |
- |
void PersonalOptionsHandler::ThemesReset(const ListValue* args) { |
UserMetricsRecordAction(UserMetricsAction("Options_ThemesReset")); |
dom_ui_->GetProfile()->ClearTheme(); |
} |
-void PersonalOptionsHandler::ThemesGallery(const ListValue* args) { |
- UserMetricsRecordAction(UserMetricsAction("Options_ThemesGallery")); |
- BrowserList::GetLastActive()->OpenThemeGalleryTabAndActivate(); |
+void PersonalOptionsHandler::GetThemesGalleryURL(const ListValue* args) { |
+ StringValue url(l10n_util::GetStringUTF16(IDS_THEMES_GALLERY_URL)); |
+ dom_ui_->CallJavascriptFunction( |
+ L"options.PersonalOptions.setThemesGalleryURL", url); |
} |
#if defined(TOOLKIT_GTK) |