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

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

Issue 1105010: Alter the "get themes" action on Mac to behave like other platforms; fix bugs... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 9 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 | « no previous file | 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 42237)
+++ chrome/browser/cocoa/preferences_window_controller.mm (working copy)
@@ -1312,19 +1312,11 @@
- (IBAction)themesGallery:(id)sender {
[self recordUserAction:"Options_ThemesGallery"];
- Browser* browser =
- BrowserList::FindBrowserWithType(profile_, Browser::TYPE_NORMAL);
+ Browser* browser = BrowserList::GetLastActive();
Avi (use Gerrit) 2010/03/23 16:24:14 BTW, you don't have to worry about finding the "no
- 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698