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

Side by Side Diff: chrome/browser/gtk/options/content_page_gtk.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.cc ('k') | chrome/browser/views/options/content_page_view.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/gtk/options/content_page_gtk.h" 5 #include "chrome/browser/gtk/options/content_page_gtk.h"
6 6
7 #include "app/gfx/gtk_util.h" 7 #include "app/gfx/gtk_util.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "chrome/browser/browser.h"
10 #include "chrome/browser/browser_list.h" 11 #include "chrome/browser/browser_list.h"
12 #include "chrome/browser/browser_window.h"
11 #include "chrome/browser/defaults.h" 13 #include "chrome/browser/defaults.h"
12 #include "chrome/browser/gtk/clear_browsing_data_dialog_gtk.h" 14 #include "chrome/browser/gtk/clear_browsing_data_dialog_gtk.h"
13 #include "chrome/browser/gtk/gtk_chrome_link_button.h" 15 #include "chrome/browser/gtk/gtk_chrome_link_button.h"
14 #include "chrome/browser/gtk/gtk_theme_provider.h" 16 #include "chrome/browser/gtk/gtk_theme_provider.h"
15 #include "chrome/browser/gtk/import_dialog_gtk.h" 17 #include "chrome/browser/gtk/import_dialog_gtk.h"
16 #include "chrome/browser/gtk/options/options_layout_gtk.h" 18 #include "chrome/browser/gtk/options/options_layout_gtk.h"
17 #include "chrome/browser/gtk/options/passwords_exceptions_window_gtk.h" 19 #include "chrome/browser/gtk/options/passwords_exceptions_window_gtk.h"
18 #include "chrome/common/gtk_util.h" 20 #include "chrome/common/gtk_util.h"
19 #include "chrome/common/notification_service.h" 21 #include "chrome/common/notification_service.h"
20 #include "chrome/common/pref_names.h" 22 #include "chrome/common/pref_names.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 page->UserMetricsRecordAction(L"Options_ThemesReset", 304 page->UserMetricsRecordAction(L"Options_ThemesReset",
303 page->profile()->GetPrefs()); 305 page->profile()->GetPrefs());
304 page->profile()->ClearTheme(); 306 page->profile()->ClearTheme();
305 } 307 }
306 308
307 // static 309 // static
308 void ContentPageGtk::OnGetThemesButtonClicked(GtkButton* widget, 310 void ContentPageGtk::OnGetThemesButtonClicked(GtkButton* widget,
309 ContentPageGtk* page) { 311 ContentPageGtk* page) {
310 page->UserMetricsRecordAction(L"Options_ThemesGallery", 312 page->UserMetricsRecordAction(L"Options_ThemesGallery",
311 page->profile()->GetPrefs()); 313 page->profile()->GetPrefs());
312 BrowserList::GetLastActive()->OpenURL( 314 BrowserList::GetLastActive()->OpenThemeGalleryTabAndActivate();
313 GURL(l10n_util::GetStringUTF8(IDS_THEMES_GALLERY_URL)),
314 GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
315 } 315 }
316 316
317 // static 317 // static
318 void ContentPageGtk::OnSystemTitleBarRadioToggled(GtkToggleButton* widget, 318 void ContentPageGtk::OnSystemTitleBarRadioToggled(GtkToggleButton* widget,
319 ContentPageGtk* page) { 319 ContentPageGtk* page) {
320 DCHECK(browser_defaults::kCanToggleSystemTitleBar); 320 DCHECK(browser_defaults::kCanToggleSystemTitleBar);
321 if (page->initializing_) 321 if (page->initializing_)
322 return; 322 return;
323 323
324 // We get two signals when selecting a radio button, one for the old radio 324 // We get two signals when selecting a radio button, one for the old radio
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 GTK_TOGGLE_BUTTON(page->form_autofill_asktosave_radio_)); 386 GTK_TOGGLE_BUTTON(page->form_autofill_asktosave_radio_));
387 if (enabled) { 387 if (enabled) {
388 page->UserMetricsRecordAction(L"Options_FormAutofill_Enable", 388 page->UserMetricsRecordAction(L"Options_FormAutofill_Enable",
389 page->profile()->GetPrefs()); 389 page->profile()->GetPrefs());
390 } else { 390 } else {
391 page->UserMetricsRecordAction(L"Options_FormAutofill_Disable", 391 page->UserMetricsRecordAction(L"Options_FormAutofill_Disable",
392 page->profile()->GetPrefs()); 392 page->profile()->GetPrefs());
393 } 393 }
394 page->ask_to_save_form_autofill_.SetValue(enabled); 394 page->ask_to_save_form_autofill_.SetValue(enabled);
395 } 395 }
OLDNEW
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/views/options/content_page_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698