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

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

Issue 11359097: Refactored the PPB_Flash_File_ModuleLocal/FileRef to the new ppapi resource model (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 unified diff | Download patch | Annotate | Revision Log
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_PROXY_PPB_FLASH_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPB_FLASH_PROXY_H_
6 #define PPAPI_PROXY_PPB_FLASH_PROXY_H_ 6 #define PPAPI_PROXY_PPB_FLASH_PROXY_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
yzshen1 2012/11/21 00:38:59 not needed.
raymes 2012/11/21 22:44:53 Done.
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "ipc/ipc_platform_file.h" 12 #include "ipc/ipc_platform_file.h"
yzshen1 2012/11/21 00:38:59 probably this is not needed.
raymes 2012/11/21 22:44:53 Done.
13 #include "ppapi/c/pp_bool.h" 13 #include "ppapi/c/pp_bool.h"
14 #include "ppapi/c/pp_instance.h" 14 #include "ppapi/c/pp_instance.h"
15 #include "ppapi/c/pp_module.h" 15 #include "ppapi/c/pp_module.h"
16 #include "ppapi/c/pp_time.h" 16 #include "ppapi/c/pp_time.h"
17 #include "ppapi/c/private/ppb_flash.h" 17 #include "ppapi/c/private/ppb_flash.h"
18 #include "ppapi/proxy/interface_proxy.h" 18 #include "ppapi/proxy/interface_proxy.h"
19 #include "ppapi/proxy/serialized_var.h" 19 #include "ppapi/proxy/serialized_var.h"
20 #include "ppapi/shared_impl/host_resource.h" 20 #include "ppapi/shared_impl/host_resource.h"
21 #include "ppapi/shared_impl/ppb_flash_shared.h" 21 #include "ppapi/thunk/ppb_flash_api.h"
22 22
23 struct PPB_Flash_Print_1_0; 23 struct PPB_Flash_Print_1_0;
24 24
25 namespace ppapi { 25 namespace ppapi {
26 26
27 struct URLRequestInfoData; 27 struct URLRequestInfoData;
28 28
29 namespace proxy { 29 namespace proxy {
30 30
31 struct PPBFlash_DrawGlyphs_Params; 31 struct PPBFlash_DrawGlyphs_Params;
32 struct SerializedDirEntry; 32 struct SerializedDirEntry;
33 class SerializedVarReturnValue; 33 class SerializedVarReturnValue;
34 34
35 /////////////////////////// WARNING:DEPRECTATED //////////////////////////////// 35 /////////////////////////// WARNING:DEPRECTATED ////////////////////////////////
36 // Please do not add any new functions to this proxy. They should be 36 // Please do not add any new functions to this proxy. They should be
37 // implemented in the new-style resource proxy (see flash_resource.h). 37 // implemented in the new-style resource proxy (see flash_resource.h).
38 // TODO(raymes): All of these functions should be moved to the new-style proxy. 38 // TODO(raymes): All of these functions should be moved to the new-style proxy.
39 //////////////////////////////////////////////////////////////////////////////// 39 ////////////////////////////////////////////////////////////////////////////////
40 class PPB_Flash_Proxy : public InterfaceProxy, public PPB_Flash_Shared { 40 class PPB_Flash_Proxy : public InterfaceProxy, public thunk::PPB_Flash_API {
41 public: 41 public:
42 explicit PPB_Flash_Proxy(Dispatcher* dispatcher); 42 explicit PPB_Flash_Proxy(Dispatcher* dispatcher);
43 virtual ~PPB_Flash_Proxy(); 43 virtual ~PPB_Flash_Proxy();
44 44
45 // This flash proxy also proxies the PPB_Flash_Print interface. This one 45 // This flash proxy also proxies the PPB_Flash_Print interface. This one
46 // doesn't use the regular thunk system because the _impl side is actually in 46 // doesn't use the regular thunk system because the _impl side is actually in
47 // Chrome rather than with the rest of the interface implementations. 47 // Chrome rather than with the rest of the interface implementations.
48 static const PPB_Flash_Print_1_0* GetFlashPrintInterface(); 48 static const PPB_Flash_Print_1_0* GetFlashPrintInterface();
49 49
50 // InterfaceProxy implementation. 50 // InterfaceProxy implementation.
(...skipping 30 matching lines...) Expand all
81 const PP_Rect* rect) OVERRIDE; 81 const PP_Rect* rect) OVERRIDE;
82 virtual void UpdateActivity(PP_Instance instance) OVERRIDE; 82 virtual void UpdateActivity(PP_Instance instance) OVERRIDE;
83 virtual PP_Var GetDeviceID(PP_Instance instance) OVERRIDE; 83 virtual PP_Var GetDeviceID(PP_Instance instance) OVERRIDE;
84 virtual int32_t GetSettingInt(PP_Instance instance, 84 virtual int32_t GetSettingInt(PP_Instance instance,
85 PP_FlashSetting setting) OVERRIDE; 85 PP_FlashSetting setting) OVERRIDE;
86 virtual PP_Var GetSetting(PP_Instance instance, 86 virtual PP_Var GetSetting(PP_Instance instance,
87 PP_FlashSetting setting) OVERRIDE; 87 PP_FlashSetting setting) OVERRIDE;
88 virtual PP_Bool SetCrashData(PP_Instance instance, 88 virtual PP_Bool SetCrashData(PP_Instance instance,
89 PP_FlashCrashKey key, 89 PP_FlashCrashKey key,
90 PP_Var value) OVERRIDE; 90 PP_Var value) OVERRIDE;
91 virtual bool CreateThreadAdapterForInstance(PP_Instance instance) OVERRIDE;
92 virtual void ClearThreadAdapterForInstance(PP_Instance instance) OVERRIDE;
93 virtual int32_t OpenFile(PP_Instance instance,
94 const char* path,
95 int32_t mode,
96 PP_FileHandle* file) OVERRIDE;
97 virtual int32_t RenameFile(PP_Instance instance,
98 const char* path_from,
99 const char* path_to) OVERRIDE;
100 virtual int32_t DeleteFileOrDir(PP_Instance instance,
101 const char* path,
102 PP_Bool recursive) OVERRIDE;
103 virtual int32_t CreateDir(PP_Instance instance, const char* path) OVERRIDE;
104 virtual int32_t QueryFile(PP_Instance instance,
105 const char* path,
106 PP_FileInfo* info) OVERRIDE;
107 virtual int32_t GetDirContents(PP_Instance instance,
108 const char* path,
109 PP_DirContents_Dev** contents) OVERRIDE;
110 virtual int32_t CreateTemporaryFile(PP_Instance instance,
111 PP_FileHandle* file) OVERRIDE;
112 virtual int32_t OpenFileRef(PP_Instance instance,
113 PP_Resource file_ref,
114 int32_t mode,
115 PP_FileHandle* file) OVERRIDE;
116 virtual int32_t QueryFileRef(PP_Instance instance,
117 PP_Resource file_ref,
118 PP_FileInfo* info) OVERRIDE;
119 virtual PP_Bool FlashIsFullscreen(PP_Instance instance) OVERRIDE; 91 virtual PP_Bool FlashIsFullscreen(PP_Instance instance) OVERRIDE;
120 virtual PP_Bool FlashSetFullscreen(PP_Instance instance, 92 virtual PP_Bool FlashSetFullscreen(PP_Instance instance,
121 PP_Bool fullscreen) OVERRIDE; 93 PP_Bool fullscreen) OVERRIDE;
122 virtual PP_Bool FlashGetScreenSize(PP_Instance instance, 94 virtual PP_Bool FlashGetScreenSize(PP_Instance instance,
123 PP_Size* size) OVERRIDE; 95 PP_Size* size) OVERRIDE;
124 96
125 static const ApiID kApiID = API_ID_PPB_FLASH; 97 static const ApiID kApiID = API_ID_PPB_FLASH;
126 98
127 private: 99 private:
128 // Message handlers. 100 // Message handlers.
(...skipping 16 matching lines...) Expand all
145 double* result); 117 double* result);
146 void OnHostMsgIsRectTopmost(PP_Instance instance, 118 void OnHostMsgIsRectTopmost(PP_Instance instance,
147 PP_Rect rect, 119 PP_Rect rect,
148 PP_Bool* result); 120 PP_Bool* result);
149 void OnHostMsgFlashSetFullscreen(PP_Instance instance, 121 void OnHostMsgFlashSetFullscreen(PP_Instance instance,
150 PP_Bool fullscreen, 122 PP_Bool fullscreen,
151 PP_Bool* result); 123 PP_Bool* result);
152 void OnHostMsgFlashGetScreenSize(PP_Instance instance, 124 void OnHostMsgFlashGetScreenSize(PP_Instance instance,
153 PP_Bool* result, 125 PP_Bool* result,
154 PP_Size* size); 126 PP_Size* size);
155 void OnHostMsgOpenFileRef(PP_Instance instance,
156 const ppapi::HostResource& host_resource,
157 int32_t mode,
158 IPC::PlatformFileForTransit* file_handle,
159 int32_t* result);
160 void OnHostMsgQueryFileRef(PP_Instance instance,
161 const ppapi::HostResource& host_resource,
162 PP_FileInfo* info,
163 int32_t* result);
164 void OnHostMsgGetDeviceID(PP_Instance instance, 127 void OnHostMsgGetDeviceID(PP_Instance instance,
165 SerializedVarReturnValue id); 128 SerializedVarReturnValue id);
166 void OnHostMsgGetSetting(PP_Instance instance, 129 void OnHostMsgGetSetting(PP_Instance instance,
167 PP_FlashSetting setting, 130 PP_FlashSetting setting,
168 SerializedVarReturnValue result); 131 SerializedVarReturnValue result);
169 void OnHostMsgInvokePrinting(PP_Instance instance); 132 void OnHostMsgInvokePrinting(PP_Instance instance);
170 133
171 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Proxy); 134 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Proxy);
172 }; 135 };
173 136
174 } // namespace proxy 137 } // namespace proxy
175 } // namespace ppapi 138 } // namespace ppapi
176 139
177 #endif // PPAPI_PROXY_PPB_FLASH_PROXY_H_ 140 #endif // PPAPI_PROXY_PPB_FLASH_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698