| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef PPAPI_PROXY_PPB_FLASH_CLIPBOARD_PROXY_H_ | |
| 6 #define PPAPI_PROXY_PPB_FLASH_CLIPBOARD_PROXY_H_ | |
| 7 | |
| 8 #include <vector> | |
| 9 | |
| 10 #include "ppapi/c/pp_instance.h" | |
| 11 #include "ppapi/proxy/interface_proxy.h" | |
| 12 #include "ppapi/thunk/ppb_flash_clipboard_api.h" | |
| 13 | |
| 14 namespace ppapi { | |
| 15 namespace proxy { | |
| 16 | |
| 17 class SerializedVarReceiveInput; | |
| 18 class SerializedVarReturnValue; | |
| 19 class SerializedVarVectorReceiveInput; | |
| 20 | |
| 21 class PPB_Flash_Clipboard_Proxy | |
| 22 : public InterfaceProxy, | |
| 23 public thunk::PPB_Flash_Clipboard_FunctionAPI { | |
| 24 public: | |
| 25 PPB_Flash_Clipboard_Proxy(Dispatcher* dispatcher); | |
| 26 virtual ~PPB_Flash_Clipboard_Proxy(); | |
| 27 | |
| 28 // FunctionGroupBase overrides. | |
| 29 thunk::PPB_Flash_Clipboard_FunctionAPI* AsPPB_Flash_Clipboard_FunctionAPI() | |
| 30 OVERRIDE; | |
| 31 | |
| 32 // PPB_Flash_Clipboard_FunctionAPI implementation. | |
| 33 virtual PP_Bool IsFormatAvailable(PP_Instance instance, | |
| 34 PP_Flash_Clipboard_Type clipboard_type, | |
| 35 PP_Flash_Clipboard_Format format) OVERRIDE; | |
| 36 virtual PP_Var ReadData(PP_Instance instance, | |
| 37 PP_Flash_Clipboard_Type clipboard_type, | |
| 38 PP_Flash_Clipboard_Format format) OVERRIDE; | |
| 39 virtual int32_t WriteData(PP_Instance instance, | |
| 40 PP_Flash_Clipboard_Type clipboard_type, | |
| 41 uint32_t data_item_count, | |
| 42 const PP_Flash_Clipboard_Format formats[], | |
| 43 const PP_Var data_items[]) OVERRIDE; | |
| 44 | |
| 45 // InterfaceProxy implementation. | |
| 46 virtual bool OnMessageReceived(const IPC::Message& msg); | |
| 47 | |
| 48 static const ApiID kApiID = API_ID_PPB_FLASH_CLIPBOARD; | |
| 49 | |
| 50 private: | |
| 51 // Message handlers. | |
| 52 void OnMsgIsFormatAvailable(PP_Instance instance, | |
| 53 int clipboard_type, | |
| 54 int format, | |
| 55 bool* result); | |
| 56 void OnMsgReadData(PP_Instance instance, | |
| 57 int clipboard_type, | |
| 58 int format, | |
| 59 SerializedVarReturnValue result); | |
| 60 void OnMsgWriteData(PP_Instance instance, | |
| 61 int clipboard_type, | |
| 62 const std::vector<int>& formats, | |
| 63 SerializedVarVectorReceiveInput data_items); | |
| 64 }; | |
| 65 | |
| 66 } // namespace proxy | |
| 67 } // namespace ppapi | |
| 68 | |
| 69 #endif // PPAPI_PROXY_PPB_FLASH_CLIPBOARD_PROXY_H_ | |
| OLD | NEW |