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

Unified Diff: chrome/browser/cocoa/preferences_window_controller.mm

Issue 160455: Add "Get themes" button to the prefs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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/cocoa/preferences_window_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/preferences_window_controller.mm
===================================================================
--- chrome/browser/cocoa/preferences_window_controller.mm (revision 22068)
+++ chrome/browser/cocoa/preferences_window_controller.mm (working copy)
@@ -32,6 +32,7 @@
#include "chrome/installer/util/google_update_settings.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
+#include "grit/locale_settings.h"
#include "net/base/cookie_policy.h"
NSString* const kUserDoneEditingPrefsNotification =
@@ -638,6 +639,23 @@
profile_->ClearTheme();
}
+- (IBAction)themesGallery:(id)sender {
+ [self recordUserAction:L"Options_ThemesGallery"];
+ Browser* browser =
+ BrowserList::FindBrowserWithType(profile_, Browser::TYPE_NORMAL);
+
+ if (!browser || !browser->GetSelectedTabContents()) {
+ browser = Browser::Create(profile_);
+ browser->OpenURL(
+ GURL(l10n_util::GetStringUTF8(IDS_THEMES_GALLERY_URL)),
+ GURL(), NEW_WINDOW, PageTransition::LINK);
+ } else {
+ browser->AddTabWithURL(
+ GURL(l10n_util::GetStringUTF8(IDS_THEMES_GALLERY_URL)),
+ GURL(), PageTransition::LINK, true, -1, false, NULL);
+ }
+}
+
- (void)setPasswordManagerEnabledIndex:(NSInteger)value {
if (value == kEnabledIndex)
[self recordUserAction:L"Options_PasswordManager_Enable"];
« no previous file with comments | « chrome/browser/cocoa/preferences_window_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698