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

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

Issue 10621: Adds the ability for save dialogs to take a default extension.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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 | Annotate | Revision Log
OLDNEW
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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 189 }
190 190
191 /////////////////////////////////////////////////////////////////////////////// 191 ///////////////////////////////////////////////////////////////////////////////
192 // ContentPageView, views::NativeButton::Listener implementation: 192 // ContentPageView, views::NativeButton::Listener implementation:
193 193
194 void ContentPageView::ButtonPressed(views::NativeButton* sender) { 194 void ContentPageView::ButtonPressed(views::NativeButton* sender) {
195 if (sender == download_browse_button_) { 195 if (sender == download_browse_button_) {
196 const std::wstring dialog_title = 196 const std::wstring dialog_title =
197 l10n_util::GetString(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE); 197 l10n_util::GetString(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE);
198 select_file_dialog_->SelectFile(SelectFileDialog::SELECT_FOLDER, 198 select_file_dialog_->SelectFile(SelectFileDialog::SELECT_FOLDER,
199 dialog_title, L"", GetRootWindow(), NULL); 199 dialog_title, std::wstring(),
200 std::wstring(), std::wstring(),
201 GetRootWindow(), NULL);
200 } else if (sender == download_ask_for_save_location_checkbox_) { 202 } else if (sender == download_ask_for_save_location_checkbox_) {
201 bool enabled = download_ask_for_save_location_checkbox_->IsSelected(); 203 bool enabled = download_ask_for_save_location_checkbox_->IsSelected();
202 if (enabled) { 204 if (enabled) {
203 UserMetricsRecordAction(L"Options_AskForSaveLocation_Enable", 205 UserMetricsRecordAction(L"Options_AskForSaveLocation_Enable",
204 profile()->GetPrefs()); 206 profile()->GetPrefs());
205 } else { 207 } else {
206 UserMetricsRecordAction(L"Options_AskForSaveLocation_Disable", 208 UserMetricsRecordAction(L"Options_AskForSaveLocation_Disable",
207 profile()->GetPrefs()); 209 profile()->GetPrefs());
208 } 210 }
209 ask_for_save_location_.SetValue(enabled); 211 ask_for_save_location_.SetValue(enabled);
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 contents, 477 contents,
476 l10n_util::GetString(IDS_OPTIONS_FONTSANDLANGUAGES_GROUP_NAME), 478 l10n_util::GetString(IDS_OPTIONS_FONTSANDLANGUAGES_GROUP_NAME),
477 L"", true); 479 L"", true);
478 } 480 }
479 481
480 void ContentPageView::UpdateDownloadDirectoryDisplay() { 482 void ContentPageView::UpdateDownloadDirectoryDisplay() {
481 download_default_download_location_display_->SetFile( 483 download_default_download_location_display_->SetFile(
482 default_download_location_.GetValue()); 484 default_download_location_.GetValue());
483 } 485 }
484 486
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698