Chromium Code Reviews| Index: extensions/shell/browser/api/file_system/shell_file_system_delegate.cc |
| diff --git a/extensions/shell/browser/api/file_system/shell_file_system_delegate.cc b/extensions/shell/browser/api/file_system/shell_file_system_delegate.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..669da13f1c4e620a7a0b89b93d140350ea84a565 |
| --- /dev/null |
| +++ b/extensions/shell/browser/api/file_system/shell_file_system_delegate.cc |
| @@ -0,0 +1,55 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "extensions/shell/browser/api/file_system/shell_file_system_delegate.h" |
| + |
| +#include "apps/saved_files_service.h" |
| +#include "base/callback.h" |
| +#include "base/files/file_path.h" |
| +#include "base/logging.h" |
| +#include "extensions/browser/api/file_system/saved_files_service_interface.h" |
| + |
| +namespace extensions { |
| + |
| +ShellFileSystemDelegate::ShellFileSystemDelegate() {} |
|
tbarzic
2017/07/14 20:37:37
nit: = default
michaelpg
2017/07/18 05:41:05
Done.
|
| + |
| +ShellFileSystemDelegate::~ShellFileSystemDelegate() {} |
| + |
| +base::FilePath ShellFileSystemDelegate::GetDefaultDirectory() { |
| + NOTIMPLEMENTED(); |
| + return base::FilePath(); |
| +} |
| + |
| +bool ShellFileSystemDelegate::ShowSelectFileDialog( |
| + scoped_refptr<UIThreadExtensionFunction> extension_function, |
| + ui::SelectFileDialog::Type type, |
| + const base::FilePath& default_path, |
| + const ui::SelectFileDialog::FileTypeInfo* file_types, |
| + FileSystemDelegate::FilesSelectedCallback files_selected_callback, |
| + base::OnceClosure file_selection_canceled_callback) { |
| + NOTIMPLEMENTED(); |
| + return false; |
| +} |
| + |
| +void ShellFileSystemDelegate::ConfirmSensitiveDirectoryAccess( |
| + bool has_write_permission, |
| + const base::string16& app_name, |
| + content::WebContents* web_contents, |
| + const base::Closure& on_accept, |
| + const base::Closure& on_cancel) { |
| + NOTIMPLEMENTED(); |
|
tbarzic
2017/07/14 20:37:37
nit: Running on_cancel would be a good default beh
michaelpg
2017/07/18 05:41:05
Done. Also did this for ShowSelectFileDialog (and
|
| +} |
| + |
| +int ShellFileSystemDelegate::GetDescriptionIdForAcceptType( |
| + const std::string& accept_type) { |
| + NOTIMPLEMENTED(); |
| + return 0; |
| +} |
| + |
| +SavedFilesServiceInterface* ShellFileSystemDelegate::GetSavedFilesService( |
| + content::BrowserContext* browser_context) { |
| + return apps::SavedFilesService::Get(browser_context); |
| +} |
| + |
| +} // namespace extensions |