| OLD | NEW |
| 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> |
| 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" |
| 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/shared_impl/ppb_flash_shared.h" |
| 22 | 22 |
| 23 namespace ppapi { | 23 namespace ppapi { |
| 24 | 24 |
| 25 struct PPB_URLRequestInfo_Data; | 25 struct PPB_URLRequestInfo_Data; |
| 26 | 26 |
| 27 namespace proxy { | 27 namespace proxy { |
| 28 | 28 |
| 29 struct PPBFlash_DrawGlyphs_Params; | 29 struct PPBFlash_DrawGlyphs_Params; |
| 30 struct SerializedDirEntry; |
| 30 class SerializedVarReturnValue; | 31 class SerializedVarReturnValue; |
| 31 | 32 |
| 32 class PPB_Flash_Proxy : public InterfaceProxy, public PPB_Flash_Shared { | 33 class PPB_Flash_Proxy : public InterfaceProxy, public PPB_Flash_Shared { |
| 33 public: | 34 public: |
| 34 explicit PPB_Flash_Proxy(Dispatcher* dispatcher); | 35 explicit PPB_Flash_Proxy(Dispatcher* dispatcher); |
| 35 virtual ~PPB_Flash_Proxy(); | 36 virtual ~PPB_Flash_Proxy(); |
| 36 | 37 |
| 37 // InterfaceProxy implementation. | 38 // InterfaceProxy implementation. |
| 38 virtual bool OnMessageReceived(const IPC::Message& msg); | 39 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 39 | 40 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 70 PP_Flash_Clipboard_Type clipboard_type, | 71 PP_Flash_Clipboard_Type clipboard_type, |
| 71 PP_Flash_Clipboard_Format format) OVERRIDE; | 72 PP_Flash_Clipboard_Format format) OVERRIDE; |
| 72 virtual PP_Var ReadClipboardData(PP_Instance instance, | 73 virtual PP_Var ReadClipboardData(PP_Instance instance, |
| 73 PP_Flash_Clipboard_Type clipboard_type, | 74 PP_Flash_Clipboard_Type clipboard_type, |
| 74 PP_Flash_Clipboard_Format format) OVERRIDE; | 75 PP_Flash_Clipboard_Format format) OVERRIDE; |
| 75 virtual int32_t WriteClipboardData(PP_Instance instance, | 76 virtual int32_t WriteClipboardData(PP_Instance instance, |
| 76 PP_Flash_Clipboard_Type clipboard_type, | 77 PP_Flash_Clipboard_Type clipboard_type, |
| 77 uint32_t data_item_count, | 78 uint32_t data_item_count, |
| 78 const PP_Flash_Clipboard_Format formats[], | 79 const PP_Flash_Clipboard_Format formats[], |
| 79 const PP_Var data_items[]) OVERRIDE; | 80 const PP_Var data_items[]) 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 OpenFileRef(PP_Instance instance, |
| 101 PP_Resource file_ref, |
| 102 int32_t mode, |
| 103 PP_FileHandle* file) OVERRIDE; |
| 104 virtual int32_t QueryFileRef(PP_Instance instance, |
| 105 PP_Resource file_ref, |
| 106 PP_FileInfo* info) OVERRIDE; |
| 80 virtual PP_Bool FlashIsFullscreen(PP_Instance instance) OVERRIDE; | 107 virtual PP_Bool FlashIsFullscreen(PP_Instance instance) OVERRIDE; |
| 81 virtual PP_Bool FlashSetFullscreen(PP_Instance instance, | 108 virtual PP_Bool FlashSetFullscreen(PP_Instance instance, |
| 82 PP_Bool fullscreen) OVERRIDE; | 109 PP_Bool fullscreen) OVERRIDE; |
| 83 virtual PP_Bool FlashGetScreenSize(PP_Instance instance, | 110 virtual PP_Bool FlashGetScreenSize(PP_Instance instance, |
| 84 PP_Size* size) OVERRIDE; | 111 PP_Size* size) OVERRIDE; |
| 85 | 112 |
| 86 static const ApiID kApiID = API_ID_PPB_FLASH; | 113 static const ApiID kApiID = API_ID_PPB_FLASH; |
| 87 | 114 |
| 88 private: | 115 private: |
| 89 // Message handlers. | 116 // Message handlers. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 118 int format, | 145 int format, |
| 119 bool* result); | 146 bool* result); |
| 120 void OnHostMsgReadClipboardData(PP_Instance instance, | 147 void OnHostMsgReadClipboardData(PP_Instance instance, |
| 121 int clipboard_type, | 148 int clipboard_type, |
| 122 int format, | 149 int format, |
| 123 SerializedVarReturnValue result); | 150 SerializedVarReturnValue result); |
| 124 void OnHostMsgWriteClipboardData(PP_Instance instance, | 151 void OnHostMsgWriteClipboardData(PP_Instance instance, |
| 125 int clipboard_type, | 152 int clipboard_type, |
| 126 const std::vector<int>& formats, | 153 const std::vector<int>& formats, |
| 127 SerializedVarVectorReceiveInput data_items); | 154 SerializedVarVectorReceiveInput data_items); |
| 155 void OnHostMsgOpenFile(PP_Instance instance, |
| 156 const std::string& path, |
| 157 int32_t mode, |
| 158 IPC::PlatformFileForTransit* file_handle, |
| 159 int32_t* result); |
| 160 void OnHostMsgRenameFile(PP_Instance instance, |
| 161 const std::string& path_from, |
| 162 const std::string& path_to, |
| 163 int32_t* result); |
| 164 void OnHostMsgDeleteFileOrDir(PP_Instance instance, |
| 165 const std::string& path, |
| 166 PP_Bool recursive, |
| 167 int32_t* result); |
| 168 void OnHostMsgCreateDir(PP_Instance instance, |
| 169 const std::string& path, |
| 170 int32_t* result); |
| 171 void OnHostMsgQueryFile(PP_Instance instance, |
| 172 const std::string& path, |
| 173 PP_FileInfo* info, |
| 174 int32_t* result); |
| 175 void OnHostMsgGetDirContents(PP_Instance instance, |
| 176 const std::string& path, |
| 177 std::vector<SerializedDirEntry>* entries, |
| 178 int32_t* result); |
| 179 void OnHostMsgOpenFileRef(PP_Instance instance, |
| 180 const ppapi::HostResource& host_resource, |
| 181 int32_t mode, |
| 182 IPC::PlatformFileForTransit* file_handle, |
| 183 int32_t* result); |
| 184 void OnHostMsgQueryFileRef(PP_Instance instance, |
| 185 const ppapi::HostResource& host_resource, |
| 186 PP_FileInfo* info, |
| 187 int32_t* result); |
| 128 | 188 |
| 129 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Proxy); | 189 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Proxy); |
| 130 }; | 190 }; |
| 131 | 191 |
| 132 } // namespace proxy | 192 } // namespace proxy |
| 133 } // namespace ppapi | 193 } // namespace ppapi |
| 134 | 194 |
| 135 #endif // PPAPI_PROXY_PPB_FLASH_PROXY_H_ | 195 #endif // PPAPI_PROXY_PPB_FLASH_PROXY_H_ |
| OLD | NEW |