| Index: native_client_sdk/src/libraries/nacl_mounts/mount_http.h
|
| diff --git a/native_client_sdk/src/libraries/nacl_mounts/mount_html5fs.h b/native_client_sdk/src/libraries/nacl_mounts/mount_http.h
|
| similarity index 57%
|
| copy from native_client_sdk/src/libraries/nacl_mounts/mount_html5fs.h
|
| copy to native_client_sdk/src/libraries/nacl_mounts/mount_http.h
|
| index 04843ce1b707e4aa7480b3b69ae55e1c550d7cbc..6ba47b21e5d949cfbb48ec6975311a27665d46ba 100644
|
| --- a/native_client_sdk/src/libraries/nacl_mounts/mount_html5fs.h
|
| +++ b/native_client_sdk/src/libraries/nacl_mounts/mount_http.h
|
| @@ -2,16 +2,17 @@
|
| * Use of this source code is governed by a BSD-style license that can be
|
| * found in the LICENSE file.
|
| */
|
| -#ifndef LIBRARIES_NACL_MOUNTS_MOUNT_HTML5FS_H_
|
| -#define LIBRARIES_NACL_MOUNTS_MOUNT_HTML5FS_H_
|
|
|
| -#include <pthread.h>
|
| +#ifndef LIBRARIES_NACL_MOUNTS_MOUNT_HTTP_H_
|
| +#define LIBRARIES_NACL_MOUNTS_MOUNT_HTTP_H_
|
| +
|
| +#include <string>
|
| #include "nacl_mounts/mount.h"
|
| #include "nacl_mounts/pepper_interface.h"
|
|
|
| class MountNode;
|
|
|
| -class MountHtml5Fs: public Mount {
|
| +class MountHttp : public Mount {
|
| public:
|
| virtual MountNode *Open(const Path& path, int mode);
|
| virtual int Close(MountNode* node);
|
| @@ -20,24 +21,23 @@ class MountHtml5Fs: public Mount {
|
| virtual int Rmdir(const Path& path);
|
| virtual int Remove(const Path& path);
|
|
|
| - PP_Resource filesystem_resource() { return filesystem_resource_; }
|
| + PP_Resource MakeUrlRequestInfo(const std::string& url,
|
| + const char* method,
|
| + StringMap_t* additional_headers);
|
|
|
| protected:
|
| - MountHtml5Fs();
|
| + MountHttp();
|
|
|
| virtual bool Init(int dev, StringMap_t& args, PepperInterface* ppapi);
|
| virtual void Destroy();
|
|
|
| - bool IsFilesystemOpen();
|
| -
|
| private:
|
| - static void FilesystemOpenCallbackThunk(void* user_data, int32_t result);
|
| - void FilesystemOpenCallback(int32_t result);
|
| -
|
| - PP_Resource filesystem_resource_;
|
| - bool filesystem_open_; // protected by lock_.
|
| + std::string url_root_;
|
| + StringMap_t headers_;
|
| + bool allow_cors_;
|
| + bool allow_credentials_;
|
|
|
| friend class Mount;
|
| };
|
|
|
| -#endif // LIBRARIES_NACL_MOUNTS_MOUNT_HTML5FS_H_
|
| +#endif // LIBRARIES_NACL_MOUNTS_MOUNT_HTTP_H_
|
|
|