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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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, | 62 ppapi::host::ReplyMessageContext reply_context, |
63 fileapi::FileSystemType file_system_type, | 63 fileapi::FileSystemType file_system_type, |
64 scoped_refptr<fileapi::FileSystemContext> fs_context); | 64 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( | 65 void OpenFileSystemComplete( |
69 ppapi::host::ReplyMessageContext reply_context, | 66 ppapi::host::ReplyMessageContext reply_context, |
70 const GURL& root, | 67 const GURL& root, |
71 const std::string& name, | 68 const std::string& name, |
72 base::PlatformFileError error); | 69 base::PlatformFileError error); |
| 70 void GotIsolatedFileSystemContext( |
| 71 ppapi::host::ReplyMessageContext reply_context, |
| 72 const std::string& fsid, |
| 73 PP_IsolatedFileSystemType_Private type, |
| 74 scoped_refptr<fileapi::FileSystemContext> fs_context); |
| 75 void OpenPluginPrivateFileSystem( |
| 76 ppapi::host::ReplyMessageContext reply_context, |
| 77 const std::string& fsid, |
| 78 scoped_refptr<fileapi::FileSystemContext> fs_context); |
| 79 void OpenPluginPrivateFileSystemComplete( |
| 80 ppapi::host::ReplyMessageContext reply_context, |
| 81 const std::string& fsid, |
| 82 base::PlatformFileError error); |
73 | 83 |
74 int32_t OnHostMsgOpen(ppapi::host::HostMessageContext* context, | 84 int32_t OnHostMsgOpen(ppapi::host::HostMessageContext* context, |
75 int64_t expected_size); | 85 int64_t expected_size); |
76 int32_t OnHostMsgInitIsolatedFileSystem( | 86 int32_t OnHostMsgInitIsolatedFileSystem( |
77 ppapi::host::HostMessageContext* context, | 87 ppapi::host::HostMessageContext* context, |
78 const std::string& fsid, | 88 const std::string& fsid, |
79 PP_IsolatedFileSystemType_Private type); | 89 PP_IsolatedFileSystemType_Private type); |
80 | 90 |
| 91 void SendReplyForIsolatedFileSystem( |
| 92 ppapi::host::ReplyMessageContext reply_context, |
| 93 const std::string& fsid, |
| 94 int32_t error); |
| 95 |
| 96 // Returns plugin ID generated from plugin's MIME type. |
| 97 std::string GeneratePluginId() const; |
| 98 |
81 BrowserPpapiHost* browser_ppapi_host_; | 99 BrowserPpapiHost* browser_ppapi_host_; |
82 | 100 |
83 PP_FileSystemType type_; | 101 PP_FileSystemType type_; |
84 bool opened_; // whether open is successful. | 102 bool opened_; // whether open is successful. |
85 GURL root_url_; | 103 GURL root_url_; |
86 scoped_refptr<fileapi::FileSystemContext> fs_context_; | 104 scoped_refptr<fileapi::FileSystemContext> fs_context_; |
87 bool called_open_; // whether open has been called. | 105 bool called_open_; // whether open has been called. |
88 | 106 |
| 107 std::string fsid_; // used only for isolated filesystems. |
| 108 |
89 base::WeakPtrFactory<PepperFileSystemBrowserHost> weak_factory_; | 109 base::WeakPtrFactory<PepperFileSystemBrowserHost> weak_factory_; |
90 | 110 |
91 DISALLOW_COPY_AND_ASSIGN(PepperFileSystemBrowserHost); | 111 DISALLOW_COPY_AND_ASSIGN(PepperFileSystemBrowserHost); |
92 }; | 112 }; |
93 | 113 |
94 } // namespace content | 114 } // namespace content |
95 | 115 |
96 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_
H_ | 116 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_
H_ |
OLD | NEW |