| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chromeos/extensions/file_manager/private_api_dialog.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_dialog.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h" | 7 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h" |
| 8 #include "chrome/browser/ui/views/select_file_dialog_extension.h" | 8 #include "chrome/browser/ui/views/select_file_dialog_extension.h" |
| 9 #include "chrome/common/extensions/api/file_manager_private.h" | 9 #include "chrome/common/extensions/api/file_manager_private.h" |
| 10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 file_manager::util::NO_LOCAL_PATH_RESOLUTION, | 91 file_manager::util::NO_LOCAL_PATH_RESOLUTION, |
| 92 base::Bind( | 92 base::Bind( |
| 93 &FileManagerPrivateSelectFilesFunction::GetSelectedFileInfoResponse, | 93 &FileManagerPrivateSelectFilesFunction::GetSelectedFileInfoResponse, |
| 94 this)); | 94 this)); |
| 95 return true; | 95 return true; |
| 96 } | 96 } |
| 97 | 97 |
| 98 void FileManagerPrivateSelectFilesFunction::GetSelectedFileInfoResponse( | 98 void FileManagerPrivateSelectFilesFunction::GetSelectedFileInfoResponse( |
| 99 const std::vector<ui::SelectedFileInfo>& files) { | 99 const std::vector<ui::SelectedFileInfo>& files) { |
| 100 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 100 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 101 if (files.empty()) { |
| 102 SendResponse(false); |
| 103 return; |
| 104 } |
| 105 |
| 101 SelectFileDialogExtension::OnMultiFilesSelected(GetFileDialogRoutingID(this), | 106 SelectFileDialogExtension::OnMultiFilesSelected(GetFileDialogRoutingID(this), |
| 102 files); | 107 files); |
| 103 SendResponse(true); | 108 SendResponse(true); |
| 104 } | 109 } |
| 105 | 110 |
| 106 } // namespace extensions | 111 } // namespace extensions |
| OLD | NEW |