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

Side by Side Diff: ppapi/shared_impl/ppb_file_ref_shared.h

Issue 13726024: Refactor FileSystem (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NON_EXPORTED_BASE Created 7 years, 8 months 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 unified diff | Download patch
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.cc ('k') | ppapi/thunk/interfaces_ppb_public_stable.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 PPAPI_SHARED_IMPL_PPB_FILE_REF_SHARED_H_ 5 #ifndef PPAPI_SHARED_IMPL_PPB_FILE_REF_SHARED_H_
6 #define PPAPI_SHARED_IMPL_PPB_FILE_REF_SHARED_H_ 6 #define PPAPI_SHARED_IMPL_PPB_FILE_REF_SHARED_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "ppapi/shared_impl/resource.h" 11 #include "ppapi/shared_impl/resource.h"
12 #include "ppapi/thunk/ppb_file_ref_api.h" 12 #include "ppapi/thunk/ppb_file_ref_api.h"
13 13
14 namespace ppapi { 14 namespace ppapi {
15 15
16 class StringVar; 16 class StringVar;
17 17
18 // FileRefs are created in a number of places and they include a number of 18 // FileRefs are created in a number of places and they include a number of
19 // return values. This struct encapsulates everything in one place. 19 // return values. This struct encapsulates everything in one place.
20 struct PPB_FileRef_CreateInfo { 20 struct PPB_FileRef_CreateInfo {
21 PPB_FileRef_CreateInfo() : file_system_type(PP_FILESYSTEMTYPE_EXTERNAL) {} 21 PPB_FileRef_CreateInfo() : file_system_type(PP_FILESYSTEMTYPE_EXTERNAL) {}
22 22
23 ppapi::HostResource resource; 23 ppapi::HostResource resource;
24 int file_system_type; // One of PP_FileSystemType values. 24 int file_system_type; // One of PP_FileSystemType values.
25 std::string path; 25 std::string path;
26 std::string name; 26 std::string name;
27
28 // Since FileRef needs to hold a FileSystem reference, we need to pass the
29 // resource in this CreateInfo. Note that this is a plugin resource as
30 // FileSystem is already in new design.
31 PP_Resource file_system_plugin_resource;
27 }; 32 };
28 33
29 // This class provides the shared implementation of a FileRef. The functions 34 // This class provides the shared implementation of a FileRef. The functions
30 // that actually "do stuff" like Touch and MakeDirectory are implemented 35 // that actually "do stuff" like Touch and MakeDirectory are implemented
31 // differently for the proxied and non-proxied derived classes. 36 // differently for the proxied and non-proxied derived classes.
32 class PPAPI_SHARED_EXPORT PPB_FileRef_Shared 37 class PPAPI_SHARED_EXPORT PPB_FileRef_Shared
33 : public Resource, 38 : public Resource,
34 public thunk::PPB_FileRef_API { 39 public thunk::PPB_FileRef_API {
35 public: 40 public:
36 PPB_FileRef_Shared(ResourceObjectType type, 41 PPB_FileRef_Shared(ResourceObjectType type,
(...skipping 17 matching lines...) Expand all
54 // return the identical string object every time they're requested. 59 // return the identical string object every time they're requested.
55 mutable scoped_refptr<StringVar> name_var_; 60 mutable scoped_refptr<StringVar> name_var_;
56 mutable scoped_refptr<StringVar> path_var_; 61 mutable scoped_refptr<StringVar> path_var_;
57 62
58 DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_FileRef_Shared); 63 DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_FileRef_Shared);
59 }; 64 };
60 65
61 } // namespace ppapi 66 } // namespace ppapi
62 67
63 #endif // PPAPI_SHARED_IMPL_PPB_FILE_REF_SHARED_H_ 68 #endif // PPAPI_SHARED_IMPL_PPB_FILE_REF_SHARED_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.cc ('k') | ppapi/thunk/interfaces_ppb_public_stable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698