Chromium Code Reviews| 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_CLIPBOARD_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_FLASH_CLIPBOARD_PROXY_H_ |
| 6 #define PPAPI_PROXY_PPB_FLASH_CLIPBOARD_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_FLASH_CLIPBOARD_PROXY_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_instance.h" | 8 #include "ppapi/c/pp_instance.h" |
| 9 #include "ppapi/proxy/interface_proxy.h" | 9 #include "ppapi/proxy/interface_proxy.h" |
| 10 #include "ppapi/thunk/ppb_flash_clipboard_api.h" | 10 #include "ppapi/thunk/ppb_flash_clipboard_api.h" |
| 11 | 11 |
| 12 namespace ppapi { | 12 namespace ppapi { |
| 13 namespace proxy { | 13 namespace proxy { |
| 14 | 14 |
| 15 class SerializedVarReceiveInput; | 15 class SerializedVarReceiveInput; |
| 16 class SerializedVarReturnValue; | 16 class SerializedVarReturnValue; |
| 17 class SerializedVarVectorReceiveInput; | |
| 17 | 18 |
| 18 class PPB_Flash_Clipboard_Proxy | 19 class PPB_Flash_Clipboard_Proxy |
| 19 : public InterfaceProxy, | 20 : public InterfaceProxy, |
| 20 public thunk::PPB_Flash_Clipboard_FunctionAPI { | 21 public thunk::PPB_Flash_Clipboard_FunctionAPI { |
| 21 public: | 22 public: |
| 22 PPB_Flash_Clipboard_Proxy(Dispatcher* dispatcher); | 23 PPB_Flash_Clipboard_Proxy(Dispatcher* dispatcher); |
| 23 virtual ~PPB_Flash_Clipboard_Proxy(); | 24 virtual ~PPB_Flash_Clipboard_Proxy(); |
| 24 | 25 |
| 25 // FunctionGroupBase overrides. | 26 // FunctionGroupBase overrides. |
| 26 thunk::PPB_Flash_Clipboard_FunctionAPI* AsPPB_Flash_Clipboard_FunctionAPI() | 27 thunk::PPB_Flash_Clipboard_FunctionAPI* AsPPB_Flash_Clipboard_FunctionAPI() |
| 27 OVERRIDE; | 28 OVERRIDE; |
| 28 | 29 |
| 29 // PPB_Flash_Clipboard_FunctionAPI implementation. | 30 // PPB_Flash_Clipboard_FunctionAPI implementation. |
| 30 virtual PP_Bool IsFormatAvailable(PP_Instance instance, | 31 virtual PP_Bool IsFormatAvailable(PP_Instance instance, |
| 31 PP_Flash_Clipboard_Type clipboard_type, | 32 PP_Flash_Clipboard_Type clipboard_type, |
| 32 PP_Flash_Clipboard_Format format) OVERRIDE; | 33 PP_Flash_Clipboard_Format format) OVERRIDE; |
| 33 virtual PP_Var ReadPlainText(PP_Instance instance, | 34 virtual PP_Var ReadPlainText(PP_Instance instance, |
|
viettrungluu
2012/02/08 22:25:01
Do Read/WritePlainText still need to be in PPB_Fla
raymes
2012/02/09 00:20:27
Nope. I thought they did but you're right. Done.
| |
| 34 PP_Flash_Clipboard_Type clipboard_type) OVERRIDE; | 35 PP_Flash_Clipboard_Type clipboard_type) OVERRIDE; |
| 35 virtual int32_t WritePlainText(PP_Instance instance, | 36 virtual int32_t WritePlainText(PP_Instance instance, |
| 36 PP_Flash_Clipboard_Type clipboard_type, | 37 PP_Flash_Clipboard_Type clipboard_type, |
| 37 const PP_Var& text) OVERRIDE; | 38 const PP_Var& text) OVERRIDE; |
| 39 virtual PP_Var ReadData(PP_Instance instance, | |
| 40 PP_Flash_Clipboard_Type clipboard_type, | |
| 41 PP_Flash_Clipboard_Format format) OVERRIDE; | |
| 42 virtual int32_t WriteData(PP_Instance instance, | |
| 43 PP_Flash_Clipboard_Type clipboard_type, | |
| 44 uint32_t data_item_count, | |
| 45 const struct | |
| 46 PP_Flash_Clipboard_Data_Item data_items[]) OVERRIDE; | |
| 38 | 47 |
| 39 // InterfaceProxy implementation. | 48 // InterfaceProxy implementation. |
| 40 virtual bool OnMessageReceived(const IPC::Message& msg); | 49 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 41 | 50 |
| 42 static const ApiID kApiID = API_ID_PPB_FLASH_CLIPBOARD; | 51 static const ApiID kApiID = API_ID_PPB_FLASH_CLIPBOARD; |
| 43 | 52 |
| 44 private: | 53 private: |
| 45 // Message handlers. | 54 // Message handlers. |
| 46 void OnMsgIsFormatAvailable(PP_Instance instance, | 55 void OnMsgIsFormatAvailable(PP_Instance instance, |
| 47 int clipboard_type, | 56 int clipboard_type, |
| 48 int format, | 57 int format, |
| 49 bool* result); | 58 bool* result); |
| 50 void OnMsgReadPlainText(PP_Instance instance, | 59 void OnMsgReadData(PP_Instance instance, |
| 51 int clipboard_type, | 60 int clipboard_type, |
| 52 SerializedVarReturnValue result); | 61 int format, |
| 53 void OnMsgWritePlainText(PP_Instance instance, | 62 SerializedVarReturnValue result); |
| 54 int clipboard_type, | 63 void OnMsgWriteData(PP_Instance instance, |
| 55 SerializedVarReceiveInput text); | 64 int clipboard_type, |
| 65 SerializedVarVectorReceiveInput formats, | |
| 66 SerializedVarVectorReceiveInput data); | |
| 56 }; | 67 }; |
| 57 | 68 |
| 58 } // namespace proxy | 69 } // namespace proxy |
| 59 } // namespace ppapi | 70 } // namespace ppapi |
| 60 | 71 |
| 61 #endif // PPAPI_PROXY_PPB_FLASH_CLIPBOARD_PROXY_H_ | 72 #endif // PPAPI_PROXY_PPB_FLASH_CLIPBOARD_PROXY_H_ |
| OLD | NEW |