Index: chrome/browser/extensions/api/extfs/extfs_api.h |
diff --git a/chrome/browser/extensions/api/extfs/extfs_api.h b/chrome/browser/extensions/api/extfs/extfs_api.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..758f7b7f4ce1c979f4149eea63e91690c4e650a5 |
--- /dev/null |
+++ b/chrome/browser/extensions/api/extfs/extfs_api.h |
@@ -0,0 +1,85 @@ |
+// Copyright 2013 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. |
+ |
+#ifndef CHROME_BROWSER_EXTENSIONS_API_EXTFS_EXTFS_API_H_ |
+#define CHROME_BROWSER_EXTENSIONS_API_EXTFS_EXTFS_API_H_ |
+ |
+#include <utility> |
+ |
+#include "base/platform_file.h" |
+#include "chrome/browser/extensions/extension_function.h" |
+#include "net/url_request/url_fetcher.h" |
+#include "net/url_request/url_fetcher_delegate.h" |
+ |
+namespace extensions { |
+ |
+class ExtfsAddMountPointFunction |
+ : public AsyncExtensionFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION("extfs.addMountPoint", |
+ EXTFS_ADDMOUNTPOINT) |
+ |
+ protected: |
+ virtual ~ExtfsAddMountPointFunction() {} |
+ virtual bool RunImpl() OVERRIDE; |
+ |
+ private: |
+}; |
+ |
+class ExtfsReturnEntryFunction |
+ : public AsyncExtensionFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION("extfs.returnEntry", |
+ EXTFS_RETURNENTRY) |
+ |
+ protected: |
+ virtual ~ExtfsReturnEntryFunction() {} |
+ virtual bool RunImpl() OVERRIDE; |
+ |
+ private: |
+}; |
+ |
+class ExtfsReturnEntriesFunction |
+ : public AsyncExtensionFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION("extfs.returnEntries", |
+ EXTFS_RETURNENTRIES) |
+ |
+ protected: |
+ virtual ~ExtfsReturnEntriesFunction() {} |
+ virtual bool RunImpl() OVERRIDE; |
+ |
+ private: |
+}; |
+ |
+class ExtfsReturnSnapshotFunction |
+ : public AsyncExtensionFunction, |
+ public net::URLFetcherDelegate { |
+ public: |
+ ExtfsReturnSnapshotFunction(); |
+ |
+ DECLARE_EXTENSION_FUNCTION("extfs.returnSnapshot", |
+ EXTFS_RETURNSNAPSHOT) |
+ |
+ protected: |
+ virtual ~ExtfsReturnSnapshotFunction() {} |
+ virtual bool RunImpl() OVERRIDE; |
+ |
+ private: |
+ // net::URLFetcherDelegate override. |
+ virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; |
+ |
+ // ... |
+ void DidCreateTemporaryFile( |
+ base::PlatformFileError* error, |
+ base::PlatformFileInfo* file_info, |
+ base::FilePath* file_path); |
+ |
+ net::URLFetcher* url_fetcher_; |
+ int request_id_; |
+}; |
+ |
+} // namespace extensions |
+ |
+#endif // CHROME_BROWSER_EXTENSIONS_API_EXTFS_EXTFS_API_H_ |