OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "extensions/browser/api/file_system/file_system_delegate.h" | |
6 | |
7 #include "base/callback.h" | |
8 #include "base/files/file_path.h" | |
9 #include "base/logging.h" | |
10 #include "ui/shell_dialogs/select_file_policy.h" | |
11 | |
12 namespace extensions { | |
13 | |
14 #if defined(OS_CHROMEOS) | |
15 namespace { | |
16 const char kNotSupportedOnCurrentPlatformError[] = | |
17 "Operation not supported on the current platform."; | |
18 } // namespace | |
19 #endif | |
20 | |
21 FileSystemDelegate::FileSystemDelegate() {} | |
22 | |
23 FileSystemDelegate::~FileSystemDelegate() {} | |
24 | |
25 base::FilePath FileSystemDelegate::GetDefaultDirectory() { | |
26 NOTIMPLEMENTED(); | |
benwells
2017/06/14 03:46:37
Can you just leave this as a pure interface?
michaelpg
2017/06/14 04:51:41
Done.
| |
27 return base::FilePath(); | |
28 } | |
29 | |
30 std::unique_ptr<ui::SelectFilePolicy> | |
31 FileSystemDelegate::CreateSelectFilePolicy(content::WebContents* web_contents) { | |
32 NOTIMPLEMENTED(); | |
33 return nullptr; | |
34 } | |
35 | |
36 scoped_refptr<ui::SelectFileDialog> FileSystemDelegate::CreateSelectFileDialog( | |
37 ui::SelectFileDialog::Listener* listener, | |
38 std::unique_ptr<ui::SelectFilePolicy> policy) { | |
39 NOTIMPLEMENTED(); | |
40 return nullptr; | |
41 } | |
42 | |
43 void FileSystemDelegate::ShowSelectFileDialogForWebContents( | |
44 scoped_refptr<ui::SelectFileDialog> dialog, | |
45 content::WebContents* web_contents, | |
46 ui::SelectFileDialog::Type type, | |
47 const base::FilePath& default_path, | |
48 const ui::SelectFileDialog::FileTypeInfo* file_types) { | |
49 NOTIMPLEMENTED(); | |
50 } | |
51 | |
52 void FileSystemDelegate::ConfirmSensitiveDirectoryAccess( | |
53 bool writable, | |
54 const base::string16& app_name, | |
55 content::WebContents* web_contents, | |
56 const base::Closure& on_accept, | |
57 const base::Closure& on_cancel) { | |
58 NOTIMPLEMENTED(); | |
59 } | |
60 | |
61 bool FileSystemDelegate::GetDescriptionIdForAcceptType( | |
62 const std::string& accept_type, | |
63 int* description_id) { | |
64 NOTIMPLEMENTED(); | |
65 return false; | |
66 } | |
67 | |
68 #if defined(OS_CHROMEOS) | |
69 bool FileSystemDelegate::IsGrantable( | |
70 content::BrowserContext* browser_context, | |
71 content::RenderFrameHost* render_frame_host, | |
72 const Extension& extension) { | |
73 NOTIMPLEMENTED(); | |
74 return false; | |
75 } | |
76 | |
77 void FileSystemDelegate::RequestFileSystem( | |
78 content::BrowserContext* browser_context, | |
79 scoped_refptr<UIThreadExtensionFunction> requester, | |
80 const Extension& extension, | |
81 std::string volume_id, | |
82 bool writable, | |
83 const FileSystemCallback& success_callback, | |
84 const ErrorCallback& error_callback) { | |
85 NOTIMPLEMENTED(); | |
86 error_callback.Run(kNotSupportedOnCurrentPlatformError); | |
87 } | |
88 | |
89 void FileSystemDelegate::GetVolumeList( | |
90 content::BrowserContext* browser_context, | |
91 const VolumeListCallback& success_callback, | |
92 const ErrorCallback& error_callback) { | |
93 NOTIMPLEMENTED(); | |
94 error_callback.Run(kNotSupportedOnCurrentPlatformError); | |
95 } | |
96 #endif | |
97 | |
98 std::unique_ptr<file_system_api::SavedFilesServiceDelegate> | |
99 FileSystemDelegate::CreateSavedFilesServiceDelegate( | |
100 content::BrowserContext* browser_context) { | |
101 NOTIMPLEMENTED(); | |
102 return nullptr; | |
103 } | |
104 | |
105 } // namespace extensions | |
OLD | NEW |