diff options
Diffstat (limited to 'ui/shell_dialogs/select_file_dialog_win.cc')
-rw-r--r-- | ui/shell_dialogs/select_file_dialog_win.cc | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/ui/shell_dialogs/select_file_dialog_win.cc b/ui/shell_dialogs/select_file_dialog_win.cc index 40215a3..4cd8896 100644 --- a/ui/shell_dialogs/select_file_dialog_win.cc +++ b/ui/shell_dialogs/select_file_dialog_win.cc @@ -30,7 +30,6 @@ #include "ui/shell_dialogs/base_shell_dialog_win.h" #include "ui/shell_dialogs/shell_dialogs_delegate.h" #include "ui/strings/grit/ui_strings.h" -#include "win8/viewer/metro_viewer_process_host.h" namespace { @@ -328,59 +327,6 @@ void SelectFileDialogImpl::SelectFileImpl( void* params) { has_multiple_file_type_choices_ = file_types ? file_types->extensions.size() > 1 : true; - // If the owning_window passed in is in metro then we need to forward the - // file open/save operations to metro. - if (GetShellDialogsDelegate() && - GetShellDialogsDelegate()->IsWindowInMetro(owning_window)) { - if (type == SELECT_SAVEAS_FILE) { - win8::MetroViewerProcessHost::HandleSaveFile( - title, - default_path, - GetFilterForFileTypes(file_types), - file_type_index, - default_extension, - base::Bind(&ui::SelectFileDialog::Listener::FileSelected, - base::Unretained(listener_)), - base::Bind(&ui::SelectFileDialog::Listener::FileSelectionCanceled, - base::Unretained(listener_))); - return; - } else if (type == SELECT_OPEN_FILE) { - win8::MetroViewerProcessHost::HandleOpenFile( - title, - default_path, - GetFilterForFileTypes(file_types), - base::Bind(&ui::SelectFileDialog::Listener::FileSelected, - base::Unretained(listener_)), - base::Bind(&ui::SelectFileDialog::Listener::FileSelectionCanceled, - base::Unretained(listener_))); - return; - } else if (type == SELECT_OPEN_MULTI_FILE) { - win8::MetroViewerProcessHost::HandleOpenMultipleFiles( - title, - default_path, - GetFilterForFileTypes(file_types), - base::Bind(&ui::SelectFileDialog::Listener::MultiFilesSelected, - base::Unretained(listener_)), - base::Bind(&ui::SelectFileDialog::Listener::FileSelectionCanceled, - base::Unretained(listener_))); - return; - } else if (type == SELECT_FOLDER || type == SELECT_UPLOAD_FOLDER) { - base::string16 title_string = title; - if (type == SELECT_UPLOAD_FOLDER && title_string.empty()) { - // If it's for uploading don't use default dialog title to - // make sure we clearly tell it's for uploading. - title_string = l10n_util::GetStringUTF16( - IDS_SELECT_UPLOAD_FOLDER_DIALOG_TITLE); - } - win8::MetroViewerProcessHost::HandleSelectFolder( - title_string, - base::Bind(&ui::SelectFileDialog::Listener::FileSelected, - base::Unretained(listener_)), - base::Bind(&ui::SelectFileDialog::Listener::FileSelectionCanceled, - base::Unretained(listener_))); - return; - } - } HWND owner = owning_window && owning_window->GetRootWindow() ? owning_window->GetHost()->GetAcceleratedWidget() : NULL; |