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

Side by Side Diff: chrome/browser/browser.cc

Issue 334048: GTK: Activate window when "Get themes" button is clicked. (Closed)
Patch Set: merge Created 11 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/gtk/options/content_page_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/browser.h" 5 #include "chrome/browser/browser.h"
6 6
7 #include "app/animation.h" 7 #include "app/animation.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/keyboard_codes.h" 10 #include "base/keyboard_codes.h"
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 GURL help_url(WideToASCII(l10n_util::GetString(IDS_HELP_CONTENT_URL))); 1223 GURL help_url(WideToASCII(l10n_util::GetString(IDS_HELP_CONTENT_URL)));
1224 AddTabWithURL(help_url, GURL(), PageTransition::AUTO_BOOKMARK, true, -1, 1224 AddTabWithURL(help_url, GURL(), PageTransition::AUTO_BOOKMARK, true, -1,
1225 false, NULL); 1225 false, NULL);
1226 } 1226 }
1227 1227
1228 void Browser::OpenExtensionsTab() { 1228 void Browser::OpenExtensionsTab() {
1229 AddTabWithURL(GURL(chrome::kChromeUIExtensionsURL), GURL(), 1229 AddTabWithURL(GURL(chrome::kChromeUIExtensionsURL), GURL(),
1230 PageTransition::AUTO_BOOKMARK, true, -1, false, NULL); 1230 PageTransition::AUTO_BOOKMARK, true, -1, false, NULL);
1231 } 1231 }
1232 1232
1233 void Browser::OpenThemeGalleryTabAndActivate() {
1234 OpenURL(GURL(l10n_util::GetStringUTF8(IDS_THEMES_GALLERY_URL)),
1235 GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
1236 window_->Activate();
1237 }
1238
1233 #if defined(OS_CHROMEOS) 1239 #if defined(OS_CHROMEOS)
1234 void Browser::ShowControlPanel() { 1240 void Browser::ShowControlPanel() {
1235 UserMetrics::RecordAction(L"ShowControlPanel", profile_); 1241 UserMetrics::RecordAction(L"ShowControlPanel", profile_);
1236 ShowOptionsWindow(OPTIONS_PAGE_SETTINGS, OPTIONS_GROUP_NONE, profile_); 1242 ShowOptionsWindow(OPTIONS_PAGE_SETTINGS, OPTIONS_GROUP_NONE, profile_);
1237 } 1243 }
1238 #endif 1244 #endif
1239 1245
1240 /////////////////////////////////////////////////////////////////////////////// 1246 ///////////////////////////////////////////////////////////////////////////////
1241 1247
1242 // static 1248 // static
(...skipping 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after
2963 /////////////////////////////////////////////////////////////////////////////// 2969 ///////////////////////////////////////////////////////////////////////////////
2964 // BrowserToolbarModel (private): 2970 // BrowserToolbarModel (private):
2965 2971
2966 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { 2972 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() {
2967 // This |current_tab| can be NULL during the initialization of the 2973 // This |current_tab| can be NULL during the initialization of the
2968 // toolbar during window creation (i.e. before any tabs have been added 2974 // toolbar during window creation (i.e. before any tabs have been added
2969 // to the window). 2975 // to the window).
2970 TabContents* current_tab = browser_->GetSelectedTabContents(); 2976 TabContents* current_tab = browser_->GetSelectedTabContents();
2971 return current_tab ? &current_tab->controller() : NULL; 2977 return current_tab ? &current_tab->controller() : NULL;
2972 } 2978 }
OLDNEW
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/gtk/options/content_page_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698