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 base::PlatformFileError error); |
73 | 82 |
74 int32_t OnHostMsgOpen(ppapi::host::HostMessageContext* context, | 83 int32_t OnHostMsgOpen(ppapi::host::HostMessageContext* context, |
75 int64_t expected_size); | 84 int64_t expected_size); |
76 int32_t OnHostMsgInitIsolatedFileSystem( | 85 int32_t OnHostMsgInitIsolatedFileSystem( |
77 ppapi::host::HostMessageContext* context, | 86 ppapi::host::HostMessageContext* context, |
78 const std::string& fsid, | 87 const std::string& fsid, |
79 PP_IsolatedFileSystemType_Private type); | 88 PP_IsolatedFileSystemType_Private type); |
80 | 89 |
| 90 // Returns plugin ID generated from plugin's MIME type. |
| 91 std::string GeneratePluginId(); |
| 92 |
81 BrowserPpapiHost* browser_ppapi_host_; | 93 BrowserPpapiHost* browser_ppapi_host_; |
82 | 94 |
83 PP_FileSystemType type_; | 95 PP_FileSystemType type_; |
84 bool opened_; // whether open is successful. | 96 bool opened_; // whether open is successful. |
85 GURL root_url_; | 97 GURL root_url_; |
86 scoped_refptr<fileapi::FileSystemContext> fs_context_; | 98 scoped_refptr<fileapi::FileSystemContext> fs_context_; |
87 bool called_open_; // whether open has been called. | 99 bool called_open_; // whether open has been called. |
88 | 100 |
89 base::WeakPtrFactory<PepperFileSystemBrowserHost> weak_factory_; | 101 base::WeakPtrFactory<PepperFileSystemBrowserHost> weak_factory_; |
90 | 102 |
91 DISALLOW_COPY_AND_ASSIGN(PepperFileSystemBrowserHost); | 103 DISALLOW_COPY_AND_ASSIGN(PepperFileSystemBrowserHost); |
92 }; | 104 }; |
93 | 105 |
94 } // namespace content | 106 } // namespace content |
95 | 107 |
96 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_
H_ | 108 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_
H_ |
OLD | NEW |