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

Side by Side Diff: ppapi/proxy/ppb_file_system_proxy.h

Issue 7623018: Move host resource from the proxy to the shared_impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppb_file_ref_proxy.cc ('k') | ppapi/proxy/ppb_file_system_proxy.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_PROXY_PPB_FILE_SYSTEM_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPB_FILE_SYSTEM_PROXY_H_
6 #define PPAPI_PROXY_PPB_FILE_SYSTEM_PROXY_H_ 6 #define PPAPI_PROXY_PPB_FILE_SYSTEM_PROXY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "ppapi/c/pp_instance.h" 11 #include "ppapi/c/pp_instance.h"
12 #include "ppapi/c/pp_resource.h" 12 #include "ppapi/c/pp_resource.h"
13 #include "ppapi/c/pp_time.h" 13 #include "ppapi/c/pp_time.h"
14 #include "ppapi/c/ppb_file_system.h" 14 #include "ppapi/c/ppb_file_system.h"
15 #include "ppapi/cpp/completion_callback.h" 15 #include "ppapi/cpp/completion_callback.h"
16 #include "ppapi/proxy/interface_proxy.h" 16 #include "ppapi/proxy/interface_proxy.h"
17 #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" 17 #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h"
18 18
19 struct PPB_FileSystem_Dev; 19 struct PPB_FileSystem_Dev;
20 20
21 namespace ppapi {
22 class HostResource;
23 }
24
21 namespace pp { 25 namespace pp {
22 namespace proxy { 26 namespace proxy {
23 27
24 class HostResource;
25
26 class PPB_FileSystem_Proxy : public InterfaceProxy { 28 class PPB_FileSystem_Proxy : public InterfaceProxy {
27 public: 29 public:
28 PPB_FileSystem_Proxy(Dispatcher* dispatcher, const void* target_interface); 30 PPB_FileSystem_Proxy(Dispatcher* dispatcher, const void* target_interface);
29 virtual ~PPB_FileSystem_Proxy(); 31 virtual ~PPB_FileSystem_Proxy();
30 32
31 static const Info* GetInfo(); 33 static const Info* GetInfo();
32 34
33 static PP_Resource CreateProxyResource(PP_Instance instance, 35 static PP_Resource CreateProxyResource(PP_Instance instance,
34 PP_FileSystemType type); 36 PP_FileSystemType type);
35 37
36 // InterfaceProxy implementation. 38 // InterfaceProxy implementation.
37 virtual bool OnMessageReceived(const IPC::Message& msg); 39 virtual bool OnMessageReceived(const IPC::Message& msg);
38 40
39 private: 41 private:
40 // Message handlers. 42 // Message handlers.
41 void OnMsgCreate(PP_Instance instance, 43 void OnMsgCreate(PP_Instance instance,
42 int type, 44 int type,
43 HostResource* result); 45 ppapi::HostResource* result);
44 void OnMsgOpen(const HostResource& filesystem, 46 void OnMsgOpen(const ppapi::HostResource& filesystem,
45 int64_t expected_size); 47 int64_t expected_size);
46 48
47 void OnMsgOpenComplete(const HostResource& filesystem, 49 void OnMsgOpenComplete(const ppapi::HostResource& filesystem,
48 int32_t result); 50 int32_t result);
49 51
50 void OpenCompleteInHost(int32_t result, const HostResource& host_resource); 52 void OpenCompleteInHost(int32_t result,
53 const ppapi::HostResource& host_resource);
51 54
52 CompletionCallbackFactory<PPB_FileSystem_Proxy, 55 CompletionCallbackFactory<PPB_FileSystem_Proxy,
53 ProxyNonThreadSafeRefCount> callback_factory_; 56 ProxyNonThreadSafeRefCount> callback_factory_;
54 57
55 DISALLOW_COPY_AND_ASSIGN(PPB_FileSystem_Proxy); 58 DISALLOW_COPY_AND_ASSIGN(PPB_FileSystem_Proxy);
56 }; 59 };
57 60
58 } // namespace proxy 61 } // namespace proxy
59 } // namespace pp 62 } // namespace pp
60 63
61 #endif // PPAPI_PROXY_PPB_FILE_SYSTEM_PROXY_H_ 64 #endif // PPAPI_PROXY_PPB_FILE_SYSTEM_PROXY_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_file_ref_proxy.cc ('k') | ppapi/proxy/ppb_file_system_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698