| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 10 |
| 11 struct PPB_Flash_Clipboard; | 11 struct PPB_Flash_Clipboard; |
| 12 | 12 |
| 13 namespace ppapi { | 13 namespace ppapi { |
| 14 namespace proxy { | 14 namespace proxy { |
| 15 | 15 |
| 16 class SerializedVarReceiveInput; | 16 class SerializedVarReceiveInput; |
| 17 class SerializedVarReturnValue; | 17 class SerializedVarReturnValue; |
| 18 | 18 |
| 19 class PPB_Flash_Clipboard_Proxy : public InterfaceProxy { | 19 class PPB_Flash_Clipboard_Proxy : public InterfaceProxy { |
| 20 public: | 20 public: |
| 21 PPB_Flash_Clipboard_Proxy(Dispatcher* dispatcher); | 21 PPB_Flash_Clipboard_Proxy(Dispatcher* dispatcher); |
| 22 virtual ~PPB_Flash_Clipboard_Proxy(); | 22 virtual ~PPB_Flash_Clipboard_Proxy(); |
| 23 | 23 |
| 24 static const Info* GetInfo(); | 24 static const PPB_Flash_Clipboard* GetInterface(); |
| 25 | 25 |
| 26 // InterfaceProxy implementation. | 26 // InterfaceProxy implementation. |
| 27 virtual bool OnMessageReceived(const IPC::Message& msg); | 27 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 // Message handlers. | 30 // Message handlers. |
| 31 void OnMsgIsFormatAvailable(PP_Instance instance_id, | 31 void OnMsgIsFormatAvailable(PP_Instance instance_id, |
| 32 int clipboard_type, | 32 int clipboard_type, |
| 33 int format, | 33 int format, |
| 34 bool* result); | 34 bool* result); |
| 35 void OnMsgReadPlainText(PP_Instance instance_id, | 35 void OnMsgReadPlainText(PP_Instance instance_id, |
| 36 int clipboard_type, | 36 int clipboard_type, |
| 37 SerializedVarReturnValue result); | 37 SerializedVarReturnValue result); |
| 38 void OnMsgWritePlainText(PP_Instance instance_id, | 38 void OnMsgWritePlainText(PP_Instance instance_id, |
| 39 int clipboard_type, | 39 int clipboard_type, |
| 40 SerializedVarReceiveInput text); | 40 SerializedVarReceiveInput text); |
| 41 | 41 |
| 42 // When this proxy is in the host side, this value caches the interface | 42 // When this proxy is in the host side, this value caches the interface |
| 43 // pointer so we don't have to retrieve it from the dispatcher each time. | 43 // pointer so we don't have to retrieve it from the dispatcher each time. |
| 44 // In the plugin, this value is always NULL. | 44 // In the plugin, this value is always NULL. |
| 45 const PPB_Flash_Clipboard* ppb_flash_clipboard_impl_; | 45 const PPB_Flash_Clipboard* ppb_flash_clipboard_impl_; |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 } // namespace proxy | 48 } // namespace proxy |
| 49 } // namespace ppapi | 49 } // namespace ppapi |
| 50 | 50 |
| 51 #endif // PPAPI_PROXY_PPB_FLASH_CLIPBOARD_PROXY_H_ | 51 #endif // PPAPI_PROXY_PPB_FLASH_CLIPBOARD_PROXY_H_ |
| OLD | NEW |