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

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

Issue 11437038: Revert 171408 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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/ppapi_param_traits.cc ('k') | ppapi/proxy/ppb_flash_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) 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 10
10 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "ipc/ipc_platform_file.h"
11 #include "ppapi/c/pp_bool.h" 13 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_instance.h" 14 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_module.h" 15 #include "ppapi/c/pp_module.h"
14 #include "ppapi/c/pp_time.h" 16 #include "ppapi/c/pp_time.h"
15 #include "ppapi/c/private/ppb_flash.h" 17 #include "ppapi/c/private/ppb_flash.h"
16 #include "ppapi/proxy/interface_proxy.h" 18 #include "ppapi/proxy/interface_proxy.h"
17 #include "ppapi/proxy/serialized_var.h" 19 #include "ppapi/proxy/serialized_var.h"
18 #include "ppapi/shared_impl/host_resource.h" 20 #include "ppapi/shared_impl/host_resource.h"
19 #include "ppapi/thunk/ppb_flash_api.h" 21 #include "ppapi/shared_impl/ppb_flash_shared.h"
20 22
21 struct PPB_Flash_Print_1_0; 23 struct PPB_Flash_Print_1_0;
22 24
23 namespace ppapi { 25 namespace ppapi {
24 26
25 struct URLRequestInfoData; 27 struct URLRequestInfoData;
26 28
27 namespace proxy { 29 namespace proxy {
28 30
29 struct PPBFlash_DrawGlyphs_Params; 31 struct PPBFlash_DrawGlyphs_Params;
30 struct SerializedDirEntry; 32 struct SerializedDirEntry;
31 class SerializedVarReturnValue; 33 class SerializedVarReturnValue;
32 34
33 /////////////////////////// WARNING:DEPRECTATED //////////////////////////////// 35 /////////////////////////// WARNING:DEPRECTATED ////////////////////////////////
34 // 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
35 // implemented in the new-style resource proxy (see flash_resource.h). 37 // implemented in the new-style resource proxy (see flash_resource.h).
36 // 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.
37 //////////////////////////////////////////////////////////////////////////////// 39 ////////////////////////////////////////////////////////////////////////////////
38 class PPB_Flash_Proxy : public InterfaceProxy, public thunk::PPB_Flash_API { 40 class PPB_Flash_Proxy : public InterfaceProxy, public PPB_Flash_Shared {
39 public: 41 public:
40 explicit PPB_Flash_Proxy(Dispatcher* dispatcher); 42 explicit PPB_Flash_Proxy(Dispatcher* dispatcher);
41 virtual ~PPB_Flash_Proxy(); 43 virtual ~PPB_Flash_Proxy();
42 44
43 // 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
44 // 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
45 // Chrome rather than with the rest of the interface implementations. 47 // Chrome rather than with the rest of the interface implementations.
46 static const PPB_Flash_Print_1_0* GetFlashPrintInterface(); 48 static const PPB_Flash_Print_1_0* GetFlashPrintInterface();
47 49
48 // InterfaceProxy implementation. 50 // InterfaceProxy implementation.
(...skipping 20 matching lines...) Expand all
69 virtual int32_t Navigate(PP_Instance instance, 71 virtual int32_t Navigate(PP_Instance instance,
70 const URLRequestInfoData& data, 72 const URLRequestInfoData& data,
71 const char* target, 73 const char* target,
72 PP_Bool from_user_action) OVERRIDE; 74 PP_Bool from_user_action) OVERRIDE;
73 virtual double GetLocalTimeZoneOffset(PP_Instance instance, 75 virtual double GetLocalTimeZoneOffset(PP_Instance instance,
74 PP_Time t) OVERRIDE; 76 PP_Time t) OVERRIDE;
75 virtual PP_Bool IsRectTopmost(PP_Instance instance, 77 virtual PP_Bool IsRectTopmost(PP_Instance instance,
76 const PP_Rect* rect) OVERRIDE; 78 const PP_Rect* rect) OVERRIDE;
77 virtual PP_Var GetSetting(PP_Instance instance, 79 virtual PP_Var GetSetting(PP_Instance instance,
78 PP_FlashSetting setting) OVERRIDE; 80 PP_FlashSetting setting) OVERRIDE;
81 virtual bool CreateThreadAdapterForInstance(PP_Instance instance) OVERRIDE;
82 virtual void ClearThreadAdapterForInstance(PP_Instance instance) OVERRIDE;
83 virtual int32_t OpenFile(PP_Instance instance,
84 const char* path,
85 int32_t mode,
86 PP_FileHandle* file) OVERRIDE;
87 virtual int32_t RenameFile(PP_Instance instance,
88 const char* path_from,
89 const char* path_to) OVERRIDE;
90 virtual int32_t DeleteFileOrDir(PP_Instance instance,
91 const char* path,
92 PP_Bool recursive) OVERRIDE;
93 virtual int32_t CreateDir(PP_Instance instance, const char* path) OVERRIDE;
94 virtual int32_t QueryFile(PP_Instance instance,
95 const char* path,
96 PP_FileInfo* info) OVERRIDE;
97 virtual int32_t GetDirContents(PP_Instance instance,
98 const char* path,
99 PP_DirContents_Dev** contents) OVERRIDE;
100 virtual int32_t CreateTemporaryFile(PP_Instance instance,
101 PP_FileHandle* file) OVERRIDE;
102 virtual int32_t OpenFileRef(PP_Instance instance,
103 PP_Resource file_ref,
104 int32_t mode,
105 PP_FileHandle* file) OVERRIDE;
106 virtual int32_t QueryFileRef(PP_Instance instance,
107 PP_Resource file_ref,
108 PP_FileInfo* info) OVERRIDE;
79 109
80 static const ApiID kApiID = API_ID_PPB_FLASH; 110 static const ApiID kApiID = API_ID_PPB_FLASH;
81 111
82 private: 112 private:
83 // Message handlers. 113 // Message handlers.
84 void OnHostMsgSetInstanceAlwaysOnTop(PP_Instance instance, 114 void OnHostMsgSetInstanceAlwaysOnTop(PP_Instance instance,
85 PP_Bool on_top); 115 PP_Bool on_top);
86 void OnHostMsgDrawGlyphs(PP_Instance instance, 116 void OnHostMsgDrawGlyphs(PP_Instance instance,
87 const PPBFlash_DrawGlyphs_Params& params, 117 const PPBFlash_DrawGlyphs_Params& params,
88 PP_Bool* result); 118 PP_Bool* result);
89 void OnHostMsgNavigate(PP_Instance instance, 119 void OnHostMsgNavigate(PP_Instance instance,
90 const URLRequestInfoData& data, 120 const URLRequestInfoData& data,
91 const std::string& target, 121 const std::string& target,
92 PP_Bool from_user_action, 122 PP_Bool from_user_action,
93 int32_t* result); 123 int32_t* result);
94 void OnHostMsgGetLocalTimeZoneOffset(PP_Instance instance, PP_Time t, 124 void OnHostMsgGetLocalTimeZoneOffset(PP_Instance instance, PP_Time t,
95 double* result); 125 double* result);
96 void OnHostMsgIsRectTopmost(PP_Instance instance, 126 void OnHostMsgIsRectTopmost(PP_Instance instance,
97 PP_Rect rect, 127 PP_Rect rect,
98 PP_Bool* result); 128 PP_Bool* result);
129 void OnHostMsgOpenFileRef(PP_Instance instance,
130 const ppapi::HostResource& host_resource,
131 int32_t mode,
132 IPC::PlatformFileForTransit* file_handle,
133 int32_t* result);
134 void OnHostMsgQueryFileRef(PP_Instance instance,
135 const ppapi::HostResource& host_resource,
136 PP_FileInfo* info,
137 int32_t* result);
99 void OnHostMsgGetSetting(PP_Instance instance, 138 void OnHostMsgGetSetting(PP_Instance instance,
100 PP_FlashSetting setting, 139 PP_FlashSetting setting,
101 SerializedVarReturnValue result); 140 SerializedVarReturnValue result);
102 void OnHostMsgInvokePrinting(PP_Instance instance); 141 void OnHostMsgInvokePrinting(PP_Instance instance);
103 142
104 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Proxy); 143 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Proxy);
105 }; 144 };
106 145
107 } // namespace proxy 146 } // namespace proxy
108 } // namespace ppapi 147 } // namespace ppapi
109 148
110 #endif // PPAPI_PROXY_PPB_FLASH_PROXY_H_ 149 #endif // PPAPI_PROXY_PPB_FLASH_PROXY_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_param_traits.cc ('k') | ppapi/proxy/ppb_flash_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698