OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <windows.h> | 5 #include <windows.h> |
6 #include <shlobj.h> | 6 #include <shlobj.h> |
7 #include <vsstyle.h> | 7 #include <vsstyle.h> |
8 #include <vssym32.h> | 8 #include <vssym32.h> |
9 | 9 |
10 #include "chrome/browser/views/options/content_page_view.h" | 10 #include "chrome/browser/views/options/content_page_view.h" |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 | 210 |
211 void ContentPageView::ButtonPressed(views::Button* sender) { | 211 void ContentPageView::ButtonPressed(views::Button* sender) { |
212 if (sender == download_browse_button_) { | 212 if (sender == download_browse_button_) { |
213 const std::wstring dialog_title = | 213 const std::wstring dialog_title = |
214 l10n_util::GetString(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE); | 214 l10n_util::GetString(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE); |
215 select_file_dialog_->SelectFile(SelectFileDialog::SELECT_FOLDER, | 215 select_file_dialog_->SelectFile(SelectFileDialog::SELECT_FOLDER, |
216 dialog_title, | 216 dialog_title, |
217 FilePath::FromWStringHack( | 217 FilePath::FromWStringHack( |
218 profile()->GetPrefs()->GetString( | 218 profile()->GetPrefs()->GetString( |
219 prefs::kDownloadDefaultDirectory)), | 219 prefs::kDownloadDefaultDirectory)), |
220 std::wstring(), 0, std::wstring(), | 220 NULL, 0, std::wstring(), |
221 GetRootWindow(), | 221 GetRootWindow(), |
222 NULL); | 222 NULL); |
223 } else if (sender == download_ask_for_save_location_checkbox_) { | 223 } else if (sender == download_ask_for_save_location_checkbox_) { |
224 bool enabled = download_ask_for_save_location_checkbox_->checked(); | 224 bool enabled = download_ask_for_save_location_checkbox_->checked(); |
225 if (enabled) { | 225 if (enabled) { |
226 UserMetricsRecordAction(L"Options_AskForSaveLocation_Enable", | 226 UserMetricsRecordAction(L"Options_AskForSaveLocation_Enable", |
227 profile()->GetPrefs()); | 227 profile()->GetPrefs()); |
228 } else { | 228 } else { |
229 UserMetricsRecordAction(L"Options_AskForSaveLocation_Disable", | 229 UserMetricsRecordAction(L"Options_AskForSaveLocation_Disable", |
230 profile()->GetPrefs()); | 230 profile()->GetPrefs()); |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 fonts_lang_group_ = new OptionsGroupView( | 509 fonts_lang_group_ = new OptionsGroupView( |
510 contents, | 510 contents, |
511 l10n_util::GetString(IDS_OPTIONS_FONTSANDLANGUAGES_GROUP_NAME), | 511 l10n_util::GetString(IDS_OPTIONS_FONTSANDLANGUAGES_GROUP_NAME), |
512 L"", true); | 512 L"", true); |
513 } | 513 } |
514 | 514 |
515 void ContentPageView::UpdateDownloadDirectoryDisplay() { | 515 void ContentPageView::UpdateDownloadDirectoryDisplay() { |
516 download_default_download_location_display_->SetFile( | 516 download_default_download_location_display_->SetFile( |
517 FilePath::FromWStringHack(default_download_location_.GetValue())); | 517 FilePath::FromWStringHack(default_download_location_.GetValue())); |
518 } | 518 } |
OLD | NEW |