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

Side by Side Diff: ppapi/proxy/file_system_resource.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/ppapi_proxy.gypi ('k') | ppapi/proxy/file_system_resource.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef PPAPI_PROXY_FILE_SYSTEM_RESOURCE_H_
6 #define PPAPI_PROXY_FILE_SYSTEM_RESOURCE_H_
7
8 #include <string>
9
10 #include "base/memory/ref_counted.h"
11 #include "ppapi/c/pp_file_info.h"
12 #include "ppapi/proxy/connection.h"
13 #include "ppapi/proxy/plugin_resource.h"
14 #include "ppapi/proxy/ppapi_proxy_export.h"
15 #include "ppapi/proxy/resource_message_params.h"
16 #include "ppapi/thunk/ppb_file_system_api.h"
17
18 namespace ppapi {
19
20 class TrackedCallback;
21
22 namespace proxy {
23
24 class PPAPI_PROXY_EXPORT FileSystemResource
25 : public PluginResource,
26 public NON_EXPORTED_BASE(thunk::PPB_FileSystem_API) {
27 public:
28 FileSystemResource(Connection connection,
29 PP_Instance instance,
30 PP_FileSystemType type);
31 virtual ~FileSystemResource();
32
33 // Resource overrides.
34 virtual thunk::PPB_FileSystem_API* AsPPB_FileSystem_API() OVERRIDE;
35
36 // PPB_FileSystem_API implementation.
37 virtual int32_t Open(int64_t expected_size,
38 scoped_refptr<TrackedCallback> callback) OVERRIDE;
39 virtual PP_FileSystemType GetType() OVERRIDE;
40
41 private:
42 // Called when the host has responded to our open request.
43 void OpenComplete(scoped_refptr<TrackedCallback> callback,
44 const ResourceMessageReplyParams& params);
45
46 PP_FileSystemType type_;
47 bool called_open_;
48
49 DISALLOW_COPY_AND_ASSIGN(FileSystemResource);
50 };
51
52 } // namespace proxy
53 } // namespace ppapi
54
55 #endif // PPAPI_PROXY_FILE_SYSTEM_RESOURCE_H_
OLDNEW
« no previous file with comments | « ppapi/ppapi_proxy.gypi ('k') | ppapi/proxy/file_system_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698