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 ReadData(PP_Instance instance, |
34 PP_Flash_Clipboard_Type clipboard_type) OVERRIDE; | 35 PP_Flash_Clipboard_Type clipboard_type, |
35 virtual int32_t WritePlainText(PP_Instance instance, | 36 PP_Flash_Clipboard_Format format) OVERRIDE; |
36 PP_Flash_Clipboard_Type clipboard_type, | 37 virtual int32_t WriteData(PP_Instance instance, |
37 const PP_Var& text) OVERRIDE; | 38 PP_Flash_Clipboard_Type clipboard_type, |
| 39 uint32_t data_item_count, |
| 40 const struct |
| 41 PP_Flash_Clipboard_Data_Item data_items[]) OVERRIDE; |
38 | 42 |
39 // InterfaceProxy implementation. | 43 // InterfaceProxy implementation. |
40 virtual bool OnMessageReceived(const IPC::Message& msg); | 44 virtual bool OnMessageReceived(const IPC::Message& msg); |
41 | 45 |
42 static const ApiID kApiID = API_ID_PPB_FLASH_CLIPBOARD; | 46 static const ApiID kApiID = API_ID_PPB_FLASH_CLIPBOARD; |
43 | 47 |
44 private: | 48 private: |
45 // Message handlers. | 49 // Message handlers. |
46 void OnMsgIsFormatAvailable(PP_Instance instance, | 50 void OnMsgIsFormatAvailable(PP_Instance instance, |
47 int clipboard_type, | 51 int clipboard_type, |
48 int format, | 52 int format, |
49 bool* result); | 53 bool* result); |
50 void OnMsgReadPlainText(PP_Instance instance, | 54 void OnMsgReadData(PP_Instance instance, |
51 int clipboard_type, | 55 int clipboard_type, |
52 SerializedVarReturnValue result); | 56 int format, |
53 void OnMsgWritePlainText(PP_Instance instance, | 57 SerializedVarReturnValue result); |
54 int clipboard_type, | 58 void OnMsgWriteData(PP_Instance instance, |
55 SerializedVarReceiveInput text); | 59 int clipboard_type, |
| 60 SerializedVarVectorReceiveInput formats, |
| 61 SerializedVarVectorReceiveInput data); |
56 }; | 62 }; |
57 | 63 |
58 } // namespace proxy | 64 } // namespace proxy |
59 } // namespace ppapi | 65 } // namespace ppapi |
60 | 66 |
61 #endif // PPAPI_PROXY_PPB_FLASH_CLIPBOARD_PROXY_H_ | 67 #endif // PPAPI_PROXY_PPB_FLASH_CLIPBOARD_PROXY_H_ |
OLD | NEW |