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

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>
10 9
11 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
12 #include "ipc/ipc_platform_file.h"
13 #include "ppapi/c/pp_bool.h" 11 #include "ppapi/c/pp_bool.h"
14 #include "ppapi/c/pp_instance.h" 12 #include "ppapi/c/pp_instance.h"
15 #include "ppapi/c/pp_module.h" 13 #include "ppapi/c/pp_module.h"
16 #include "ppapi/c/pp_time.h" 14 #include "ppapi/c/pp_time.h"
17 #include "ppapi/c/private/ppb_flash.h" 15 #include "ppapi/c/private/ppb_flash.h"
18 #include "ppapi/proxy/interface_proxy.h" 16 #include "ppapi/proxy/interface_proxy.h"
19 #include "ppapi/proxy/serialized_var.h" 17 #include "ppapi/proxy/serialized_var.h"
20 #include "ppapi/shared_impl/host_resource.h" 18 #include "ppapi/shared_impl/host_resource.h"
21 #include "ppapi/shared_impl/ppb_flash_shared.h" 19 #include "ppapi/thunk/ppb_flash_api.h"
22 20
23 struct PPB_Flash_Print_1_0; 21 struct PPB_Flash_Print_1_0;
24 22
25 namespace ppapi { 23 namespace ppapi {
26 24
27 struct URLRequestInfoData; 25 struct URLRequestInfoData;
28 26
29 namespace proxy { 27 namespace proxy {
30 28
31 struct PPBFlash_DrawGlyphs_Params; 29 struct PPBFlash_DrawGlyphs_Params;
32 struct SerializedDirEntry; 30 struct SerializedDirEntry;
33 class SerializedVarReturnValue; 31 class SerializedVarReturnValue;
34 32
35 /////////////////////////// WARNING:DEPRECTATED //////////////////////////////// 33 /////////////////////////// WARNING:DEPRECTATED ////////////////////////////////
36 // Please do not add any new functions to this proxy. They should be 34 // 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). 35 // 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. 36 // TODO(raymes): All of these functions should be moved to the new-style proxy.
39 //////////////////////////////////////////////////////////////////////////////// 37 ////////////////////////////////////////////////////////////////////////////////
40 class PPB_Flash_Proxy : public InterfaceProxy, public PPB_Flash_Shared { 38 class PPB_Flash_Proxy : public InterfaceProxy, public thunk::PPB_Flash_API {
41 public: 39 public:
42 explicit PPB_Flash_Proxy(Dispatcher* dispatcher); 40 explicit PPB_Flash_Proxy(Dispatcher* dispatcher);
43 virtual ~PPB_Flash_Proxy(); 41 virtual ~PPB_Flash_Proxy();
44 42
45 // This flash proxy also proxies the PPB_Flash_Print interface. This one 43 // 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 44 // 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. 45 // Chrome rather than with the rest of the interface implementations.
48 static const PPB_Flash_Print_1_0* GetFlashPrintInterface(); 46 static const PPB_Flash_Print_1_0* GetFlashPrintInterface();
49 47
50 // InterfaceProxy implementation. 48 // InterfaceProxy implementation.
(...skipping 30 matching lines...) Expand all
81 const PP_Rect* rect) OVERRIDE; 79 const PP_Rect* rect) OVERRIDE;
82 virtual void UpdateActivity(PP_Instance instance) OVERRIDE; 80 virtual void UpdateActivity(PP_Instance instance) OVERRIDE;
83 virtual PP_Var GetDeviceID(PP_Instance instance) OVERRIDE; 81 virtual PP_Var GetDeviceID(PP_Instance instance) OVERRIDE;
84 virtual int32_t GetSettingInt(PP_Instance instance, 82 virtual int32_t GetSettingInt(PP_Instance instance,
85 PP_FlashSetting setting) OVERRIDE; 83 PP_FlashSetting setting) OVERRIDE;
86 virtual PP_Var GetSetting(PP_Instance instance, 84 virtual PP_Var GetSetting(PP_Instance instance,
87 PP_FlashSetting setting) OVERRIDE; 85 PP_FlashSetting setting) OVERRIDE;
88 virtual PP_Bool SetCrashData(PP_Instance instance, 86 virtual PP_Bool SetCrashData(PP_Instance instance,
89 PP_FlashCrashKey key, 87 PP_FlashCrashKey key,
90 PP_Var value) OVERRIDE; 88 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; 89 virtual PP_Bool FlashIsFullscreen(PP_Instance instance) OVERRIDE;
120 virtual PP_Bool FlashSetFullscreen(PP_Instance instance, 90 virtual PP_Bool FlashSetFullscreen(PP_Instance instance,
121 PP_Bool fullscreen) OVERRIDE; 91 PP_Bool fullscreen) OVERRIDE;
122 virtual PP_Bool FlashGetScreenSize(PP_Instance instance, 92 virtual PP_Bool FlashGetScreenSize(PP_Instance instance,
123 PP_Size* size) OVERRIDE; 93 PP_Size* size) OVERRIDE;
124 94
125 static const ApiID kApiID = API_ID_PPB_FLASH; 95 static const ApiID kApiID = API_ID_PPB_FLASH;
126 96
127 private: 97 private:
128 // Message handlers. 98 // Message handlers.
(...skipping 16 matching lines...) Expand all
145 double* result); 115 double* result);
146 void OnHostMsgIsRectTopmost(PP_Instance instance, 116 void OnHostMsgIsRectTopmost(PP_Instance instance,
147 PP_Rect rect, 117 PP_Rect rect,
148 PP_Bool* result); 118 PP_Bool* result);
149 void OnHostMsgFlashSetFullscreen(PP_Instance instance, 119 void OnHostMsgFlashSetFullscreen(PP_Instance instance,
150 PP_Bool fullscreen, 120 PP_Bool fullscreen,
151 PP_Bool* result); 121 PP_Bool* result);
152 void OnHostMsgFlashGetScreenSize(PP_Instance instance, 122 void OnHostMsgFlashGetScreenSize(PP_Instance instance,
153 PP_Bool* result, 123 PP_Bool* result,
154 PP_Size* size); 124 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, 125 void OnHostMsgGetDeviceID(PP_Instance instance,
165 SerializedVarReturnValue id); 126 SerializedVarReturnValue id);
166 void OnHostMsgGetSetting(PP_Instance instance, 127 void OnHostMsgGetSetting(PP_Instance instance,
167 PP_FlashSetting setting, 128 PP_FlashSetting setting,
168 SerializedVarReturnValue result); 129 SerializedVarReturnValue result);
169 void OnHostMsgInvokePrinting(PP_Instance instance); 130 void OnHostMsgInvokePrinting(PP_Instance instance);
170 131
171 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Proxy); 132 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Proxy);
172 }; 133 };
173 134
174 } // namespace proxy 135 } // namespace proxy
175 } // namespace ppapi 136 } // namespace ppapi
176 137
177 #endif // PPAPI_PROXY_PPB_FLASH_PROXY_H_ 138 #endif // PPAPI_PROXY_PPB_FLASH_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698