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

Unified Diff: chrome/browser/download/save_package.cc

Issue 164547: Mac: make save/open dialogs operate as tab-modal sheets.... Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Painfully (but hopefully correctly) merged ToT. Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/download/download_request_manager.cc ('k') | chrome/browser/gtk/dialogs_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/save_package.cc
diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc
index 1b9eaa9e7322fdfb1c07de1f81ecb3067ea8eda3..6ce3a2acf7c766aa1c53c4f6d466b7715d06a16c 100644
--- a/chrome/browser/download/save_package.cc
+++ b/chrome/browser/download/save_package.cc
@@ -1081,7 +1081,7 @@ void SavePackage::ContinueGetSaveInfo(FilePath save_dir) {
FilePath suggested_path =
save_dir.Append(GetSuggestedNameForSaveAs(title, can_save_as_complete));
- // If the contents can not be saved as complete-HTML, do not show the
+ // If the contents cannot be saved as complete-HTML, do not show the
// file filters.
if (can_save_as_complete) {
file_type_info.extensions.resize(2);
@@ -1107,6 +1107,16 @@ void SavePackage::ContinueGetSaveInfo(FilePath save_dir) {
if (g_should_prompt_for_filename) {
if (!select_file_dialog_.get())
select_file_dialog_ = SelectFileDialog::Create(this);
+#if defined(OS_MACOSX)
+ select_file_dialog_->SelectFileInTab(SelectFileDialog::SELECT_SAVEAS_FILE,
+ string16(),
+ suggested_path,
+ &file_type_info,
+ file_type_index,
+ default_extension,
+ tab_contents_,
+ save_params);
+#else
select_file_dialog_->SelectFile(SelectFileDialog::SELECT_SAVEAS_FILE,
string16(),
suggested_path,
@@ -1116,6 +1126,7 @@ void SavePackage::ContinueGetSaveInfo(FilePath save_dir) {
platform_util::GetTopLevel(
tab_contents_->GetNativeView()),
save_params);
+#endif
} else {
// Just use 'suggested_path' instead of opening the dialog prompt.
ContinueSave(save_params, suggested_path, file_type_index);
« no previous file with comments | « chrome/browser/download/download_request_manager.cc ('k') | chrome/browser/gtk/dialogs_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698