summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 19:52:22 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 19:52:22 +0000
commitb31db6c5e7d3f42f1de7d7095c609c18f6fd4d08 (patch)
tree9abfe11bdb1e38c09766da86638f6baa0802c73c /chrome/browser
parent4718325ce7e91e4f52de4e2e9fca8934e1ba88f0 (diff)
downloadchromium_src-b31db6c5e7d3f42f1de7d7095c609c18f6fd4d08.zip
chromium_src-b31db6c5e7d3f42f1de7d7095c609c18f6fd4d08.tar.gz
chromium_src-b31db6c5e7d3f42f1de7d7095c609c18f6fd4d08.tar.bz2
Alter the "get themes" action on Mac to behave like other platforms; fix bugs.
BUG=http://crbug.com/38002 TEST=as in bug Review URL: http://codereview.chromium.org/1105010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42374 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/cocoa/preferences_window_controller.mm14
1 files changed, 3 insertions, 11 deletions
diff --git a/chrome/browser/cocoa/preferences_window_controller.mm b/chrome/browser/cocoa/preferences_window_controller.mm
index 5280811..8524e26 100644
--- a/chrome/browser/cocoa/preferences_window_controller.mm
+++ b/chrome/browser/cocoa/preferences_window_controller.mm
@@ -1316,19 +1316,11 @@ const int kDisabledIndex = 1;
- (IBAction)themesGallery:(id)sender {
[self recordUserAction:UserMetricsAction("Options_ThemesGallery")];
- Browser* browser =
- BrowserList::FindBrowserWithType(profile_, Browser::TYPE_NORMAL);
+ Browser* browser = BrowserList::GetLastActive();
- if (!browser || !browser->GetSelectedTabContents()) {
+ 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->OpenURL(
- GURL(l10n_util::GetStringUTF8(IDS_THEMES_GALLERY_URL)),
- GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
- }
+ browser->OpenThemeGalleryTabAndActivate();
}
// Called when the "stop syncing" confirmation dialog started by