Chromium Code Reviews| 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_REF_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_REF_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_REF_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_REF_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "content/public/browser/browser_ppapi_host.h" | 11 #include "content/public/browser/browser_ppapi_host.h" |
| 12 #include "ppapi/c/pp_file_info.h" | 12 #include "ppapi/c/pp_file_info.h" |
| 13 #include "ppapi/c/pp_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
| 14 #include "ppapi/c/pp_resource.h" | 14 #include "ppapi/c/pp_resource.h" |
| 15 #include "ppapi/c/pp_time.h" | 15 #include "ppapi/c/pp_time.h" |
| 16 #include "ppapi/host/host_message_context.h" | 16 #include "ppapi/host/host_message_context.h" |
| 17 #include "ppapi/host/resource_host.h" | 17 #include "ppapi/host/resource_host.h" |
| 18 #include "webkit/browser/fileapi/file_system_url.h" | 18 #include "webkit/browser/fileapi/file_system_url.h" |
| 19 | 19 |
| 20 namespace content { | 20 namespace content { |
| 21 | 21 |
| 22 class PepperFileRefHost; | 22 class PepperFileRefHost; |
| 23 class PepperFileSystemBrowserHost; | |
| 23 | 24 |
| 24 // Internal and external filesystems have very different codepaths for | 25 // Internal and external filesystems have very different codepaths for |
| 25 // performing FileRef operations. The logic is split into separate classes | 26 // performing FileRef operations. The logic is split into separate classes |
| 26 // to make it easier to read. | 27 // to make it easier to read. |
| 27 class PepperFileRefBackend { | 28 class PepperFileRefBackend { |
| 28 public: | 29 public: |
| 29 virtual ~PepperFileRefBackend(); | 30 virtual ~PepperFileRefBackend(); |
| 30 | 31 |
| 31 virtual int32_t MakeDirectory(ppapi::host::ReplyMessageContext context, | 32 virtual int32_t MakeDirectory(ppapi::host::ReplyMessageContext context, |
| 32 bool make_ancestors) = 0; | 33 bool make_ancestors) = 0; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 int32_t OnDelete(ppapi::host::HostMessageContext* context); | 96 int32_t OnDelete(ppapi::host::HostMessageContext* context); |
| 96 int32_t OnRename(ppapi::host::HostMessageContext* context, | 97 int32_t OnRename(ppapi::host::HostMessageContext* context, |
| 97 PP_Resource new_file_ref); | 98 PP_Resource new_file_ref); |
| 98 int32_t OnQuery(ppapi::host::HostMessageContext* context); | 99 int32_t OnQuery(ppapi::host::HostMessageContext* context); |
| 99 int32_t OnReadDirectoryEntries(ppapi::host::HostMessageContext* context); | 100 int32_t OnReadDirectoryEntries(ppapi::host::HostMessageContext* context); |
| 100 int32_t OnGetAbsolutePath(ppapi::host::HostMessageContext* context); | 101 int32_t OnGetAbsolutePath(ppapi::host::HostMessageContext* context); |
| 101 | 102 |
| 102 BrowserPpapiHost* host_; | 103 BrowserPpapiHost* host_; |
| 103 scoped_ptr<PepperFileRefBackend> backend_; | 104 scoped_ptr<PepperFileRefBackend> backend_; |
| 104 PP_FileSystemType fs_type_; | 105 PP_FileSystemType fs_type_; |
| 106 base::WeakPtr<PepperFileSystemBrowserHost> file_system_host_; | |
|
bbudge
2013/10/22 01:59:39
It looks like this is only used in a single method
teravest
2013/10/22 15:45:05
Good catch, removed.
| |
| 105 | 107 |
| 106 DISALLOW_COPY_AND_ASSIGN(PepperFileRefHost); | 108 DISALLOW_COPY_AND_ASSIGN(PepperFileRefHost); |
| 107 }; | 109 }; |
| 108 | 110 |
| 109 } // namespace content | 111 } // namespace content |
| 110 | 112 |
| 111 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_REF_HOST_H_ | 113 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_REF_HOST_H_ |
| OLD | NEW |