| 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 GURL GetRootUrl() const { return root_url_; } | 52 GURL GetRootUrl() const { return root_url_; } |
| 53 scoped_refptr<fileapi::FileSystemContext> GetFileSystemContext() const { | 53 scoped_refptr<fileapi::FileSystemContext> GetFileSystemContext() const { |
| 54 return fs_context_; | 54 return fs_context_; |
| 55 } | 55 } |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 void OpenExistingWithContext( | 58 void OpenExistingWithContext( |
| 59 const base::Closure& callback, | 59 const base::Closure& callback, |
| 60 scoped_refptr<fileapi::FileSystemContext> fs_context); | 60 scoped_refptr<fileapi::FileSystemContext> fs_context); |
| 61 void GotFileSystemContext( | 61 void GotFileSystemContext( |
| 62 ppapi::host::ReplyMessageContext reply_context, | |
| 63 fileapi::FileSystemType file_system_type, | 62 fileapi::FileSystemType file_system_type, |
| 64 scoped_refptr<fileapi::FileSystemContext> fs_context); | 63 scoped_refptr<fileapi::FileSystemContext> fs_context); |
| 65 void GotIsolatedFileSystemContext( | |
| 66 ppapi::host::ReplyMessageContext reply_context, | |
| 67 scoped_refptr<fileapi::FileSystemContext> fs_context); | |
| 68 void OpenFileSystemComplete( | 64 void OpenFileSystemComplete( |
| 69 ppapi::host::ReplyMessageContext reply_context, | |
| 70 const GURL& root, | 65 const GURL& root, |
| 71 const std::string& name, | 66 const std::string& name, |
| 72 base::PlatformFileError error); | 67 base::PlatformFileError error); |
| 68 void GotIsolatedFileSystemContext( |
| 69 const std::string& fsid, |
| 70 PP_IsolatedFileSystemType_Private type, |
| 71 scoped_refptr<fileapi::FileSystemContext> fs_context); |
| 72 void OpenPluginPrivateFileSystem( |
| 73 const std::string& fsid, |
| 74 scoped_refptr<fileapi::FileSystemContext> fs_context); |
| 75 void OpenPluginPrivateFileSystemComplete( |
| 76 const std::string& fsid, |
| 77 base::PlatformFileError error); |
| 73 | 78 |
| 74 int32_t OnHostMsgOpen(ppapi::host::HostMessageContext* context, | 79 int32_t OnHostMsgOpen(ppapi::host::HostMessageContext* context, |
| 75 int64_t expected_size); | 80 int64_t expected_size); |
| 76 int32_t OnHostMsgInitIsolatedFileSystem( | 81 int32_t OnHostMsgInitIsolatedFileSystem( |
| 77 ppapi::host::HostMessageContext* context, | 82 ppapi::host::HostMessageContext* context, |
| 78 const std::string& fsid, | 83 const std::string& fsid, |
| 79 PP_IsolatedFileSystemType_Private type); | 84 PP_IsolatedFileSystemType_Private type); |
| 80 | 85 |
| 86 void SendReplyForIsolatedFileSystem(const std::string& fsid, |
| 87 int32_t error); |
| 88 |
| 89 // Returns plugin ID generated from plugin's MIME type. |
| 90 std::string GeneratePluginId(); |
| 91 |
| 81 BrowserPpapiHost* browser_ppapi_host_; | 92 BrowserPpapiHost* browser_ppapi_host_; |
| 82 | 93 |
| 83 PP_FileSystemType type_; | 94 PP_FileSystemType type_; |
| 84 bool opened_; // whether open is successful. | 95 bool opened_; // whether open is successful. |
| 85 GURL root_url_; | 96 GURL root_url_; |
| 86 scoped_refptr<fileapi::FileSystemContext> fs_context_; | 97 scoped_refptr<fileapi::FileSystemContext> fs_context_; |
| 87 bool called_open_; // whether open has been called. | 98 bool called_open_; // whether open has been called. |
| 88 | 99 |
| 100 std::string fsid_; // used only for isolated filesystems. |
| 101 |
| 102 ppapi::host::ReplyMessageContext reply_context_; |
| 103 |
| 89 base::WeakPtrFactory<PepperFileSystemBrowserHost> weak_factory_; | 104 base::WeakPtrFactory<PepperFileSystemBrowserHost> weak_factory_; |
| 90 | 105 |
| 91 DISALLOW_COPY_AND_ASSIGN(PepperFileSystemBrowserHost); | 106 DISALLOW_COPY_AND_ASSIGN(PepperFileSystemBrowserHost); |
| 92 }; | 107 }; |
| 93 | 108 |
| 94 } // namespace content | 109 } // namespace content |
| 95 | 110 |
| 96 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_
H_ | 111 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_
H_ |
| OLD | NEW |