Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1111)

Unified Diff: content/browser/renderer_host/pepper/pepper_file_system_browser_host.h

Issue 55133010: [PPAPI] Fixed FileSystems from JavaScript not having a context. (Closed) Base URL: http://git.chromium.org/chromium/src.git@pepper-fs-fileio-test-disable
Patch Set: Nit: Return early, and un-indent code. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/pepper/pepper_file_system_browser_host.h
diff --git a/content/browser/renderer_host/pepper/pepper_file_system_browser_host.h b/content/browser/renderer_host/pepper/pepper_file_system_browser_host.h
index ebf55f48546d2fab78ecb29a1214112ebf40c519..5aa6430eb00e8201b1111fcece985efa319469ba 100644
--- a/content/browser/renderer_host/pepper/pepper_file_system_browser_host.h
+++ b/content/browser/renderer_host/pepper/pepper_file_system_browser_host.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_H_
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/memory/weak_ptr.h"
#include "ppapi/c/pp_file_info.h"
#include "ppapi/host/host_message_context.h"
@@ -28,17 +29,14 @@ class PepperFileSystemBrowserHost :
PP_Instance instance,
PP_Resource resource,
PP_FileSystemType type);
- // Creates a new PepperFileSystemBrowserHost with an existing file system at
- // the given |root_url| and of the given |type|. The file system at |root_url|
- // must already be opened. Once created, the PepperFileSystemBrowserHost may
- // be used without being opened.
- PepperFileSystemBrowserHost(BrowserPpapiHost* host,
- PP_Instance instance,
- PP_Resource resource,
- const GURL& root_url,
- PP_FileSystemType type);
virtual ~PepperFileSystemBrowserHost();
+ // Opens the PepperFileSystemBrowserHost to use an existing file system at the
+ // given |root_url|. The file system at |root_url| must already be opened and
+ // have the type given by GetType().
+ // Calls |callback| when complete.
+ void OpenExisting(const GURL& root_url, const base::Closure& callback);
+
// ppapi::host::ResourceHost override.
virtual int32_t OnResourceMessageReceived(
const IPC::Message& msg,
@@ -54,6 +52,9 @@ class PepperFileSystemBrowserHost :
}
private:
+ void OpenExistingWithContext(
+ const base::Closure& callback,
+ scoped_refptr<fileapi::FileSystemContext> fs_context);
void GotFileSystemContext(
ppapi::host::ReplyMessageContext reply_context,
fileapi::FileSystemType file_system_type,
« no previous file with comments | « chrome/test/ppapi/ppapi_browsertest.cc ('k') | content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698