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

Side by Side Diff: chrome/browser/views/options/content_page_view.cc

Issue 160416: Add "Get Themes" button to gtk options dialog. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/gtk/options/content_page_gtk.cc ('k') | no next file » | 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/views/options/content_page_view.h" 5 #include "chrome/browser/views/options/content_page_view.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 #include <vsstyle.h> 9 #include <vsstyle.h>
10 #include <vssym32.h> 10 #include <vssym32.h>
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 ask_to_save_form_autofill_.SetValue(enabled); 83 ask_to_save_form_autofill_.SetValue(enabled);
84 } else if (sender == passwords_exceptions_button_) { 84 } else if (sender == passwords_exceptions_button_) {
85 UserMetricsRecordAction(L"Options_ShowPasswordsExceptions", NULL); 85 UserMetricsRecordAction(L"Options_ShowPasswordsExceptions", NULL);
86 PasswordsExceptionsWindowView::Show(profile()); 86 PasswordsExceptionsWindowView::Show(profile());
87 } else if (sender == themes_reset_button_) { 87 } else if (sender == themes_reset_button_) {
88 UserMetricsRecordAction(L"Options_ThemesReset", profile()->GetPrefs()); 88 UserMetricsRecordAction(L"Options_ThemesReset", profile()->GetPrefs());
89 profile()->ClearTheme(); 89 profile()->ClearTheme();
90 } else if (sender == themes_gallery_button_) { 90 } else if (sender == themes_gallery_button_) {
91 UserMetricsRecordAction(L"Options_ThemesGallery", profile()->GetPrefs()); 91 UserMetricsRecordAction(L"Options_ThemesGallery", profile()->GetPrefs());
92 Browser* browser = 92 BrowserList::GetLastActive()->OpenURL(
93 BrowserList::FindBrowserWithType(profile(), Browser::TYPE_NORMAL); 93 GURL(l10n_util::GetString(IDS_THEMES_GALLERY_URL)),
94 94 GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
Evan Stade 2009/07/30 21:23:49 correct me if I'm wrong, but I believe this does e
95 if (!browser || !browser->GetSelectedTabContents()) {
96 browser = Browser::Create(profile());
97 browser->OpenURL(GURL(l10n_util::GetString(IDS_THEMES_GALLERY_URL)),
98 GURL(), NEW_WINDOW, PageTransition::LINK);
99 } else {
100 browser->AddTabWithURL(GURL(l10n_util::GetString(IDS_THEMES_GALLERY_URL)),
101 GURL(), PageTransition::LINK, true, -1, false, NULL);
102 }
103 } else if (sender == import_button_) { 95 } else if (sender == import_button_) {
104 views::Window::CreateChromeWindow( 96 views::Window::CreateChromeWindow(
105 GetWindow()->GetNativeWindow(), 97 GetWindow()->GetNativeWindow(),
106 gfx::Rect(), 98 gfx::Rect(),
107 new ImporterView(profile()))->Show(); 99 new ImporterView(profile()))->Show();
108 } else if (sender == clear_data_button_) { 100 } else if (sender == clear_data_button_) {
109 views::Window::CreateChromeWindow( 101 views::Window::CreateChromeWindow(
110 GetWindow()->GetNativeWindow(), 102 GetWindow()->GetNativeWindow(),
111 gfx::Rect(), 103 gfx::Rect(),
112 new ClearBrowsingDataView(profile()))->Show(); 104 new ClearBrowsingDataView(profile()))->Show();
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 double_col_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, 325 double_col_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0,
334 GridLayout::USE_PREF, 0, 0); 326 GridLayout::USE_PREF, 0, 0);
335 layout->StartRow(0, double_column_view_set_id); 327 layout->StartRow(0, double_column_view_set_id);
336 layout->AddView(import_button_); 328 layout->AddView(import_button_);
337 layout->AddView(clear_data_button_); 329 layout->AddView(clear_data_button_);
338 330
339 browsing_data_group_ = new OptionsGroupView( 331 browsing_data_group_ = new OptionsGroupView(
340 contents, l10n_util::GetString(IDS_OPTIONS_BROWSING_DATA_GROUP_NAME), 332 contents, l10n_util::GetString(IDS_OPTIONS_BROWSING_DATA_GROUP_NAME),
341 L"", true); 333 L"", true);
342 } 334 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/options/content_page_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698