Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1559)

Unified Diff: ppapi/proxy/ppb_flash_clipboard_proxy.h

Issue 8365017: Convert the flash clipboard API to thunk system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/proxy/ppb_flash_clipboard_proxy.h
diff --git a/ppapi/proxy/ppb_flash_clipboard_proxy.h b/ppapi/proxy/ppb_flash_clipboard_proxy.h
index 79505fe5870200927e09b74f9c8ca573f16bc258..c337f82d6ccf54e6d302f36d13b10dea8e35e16d 100644
--- a/ppapi/proxy/ppb_flash_clipboard_proxy.h
+++ b/ppapi/proxy/ppb_flash_clipboard_proxy.h
@@ -7,6 +7,7 @@
#include "ppapi/c/pp_instance.h"
#include "ppapi/proxy/interface_proxy.h"
+#include "ppapi/thunk/ppb_flash_clipboard_api.h"
struct PPB_Flash_Clipboard;
@@ -16,33 +17,44 @@ namespace proxy {
class SerializedVarReceiveInput;
class SerializedVarReturnValue;
-class PPB_Flash_Clipboard_Proxy : public InterfaceProxy {
+class PPB_Flash_Clipboard_Proxy
+ : public InterfaceProxy,
+ public thunk::PPB_Flash_Clipboard_FunctionAPI {
public:
PPB_Flash_Clipboard_Proxy(Dispatcher* dispatcher);
virtual ~PPB_Flash_Clipboard_Proxy();
- static const PPB_Flash_Clipboard* GetInterface();
+ // FunctionGroupBase overrides.
+ thunk::PPB_Flash_Clipboard_FunctionAPI* AsPPB_Flash_Clipboard_FunctionAPI()
+ OVERRIDE;
+
+ // PPB_Flash_Clipboard_FunctionAPI implementation.
+ virtual PP_Bool IsFormatAvailable(PP_Instance instance,
+ PP_Flash_Clipboard_Type clipboard_type,
+ PP_Flash_Clipboard_Format format) OVERRIDE;
+ virtual PP_Var ReadPlainText(PP_Instance instance,
+ PP_Flash_Clipboard_Type clipboard_type) OVERRIDE;
+ virtual int32_t WritePlainText(PP_Instance instance,
+ PP_Flash_Clipboard_Type clipboard_type,
+ const PP_Var& text) OVERRIDE;
// InterfaceProxy implementation.
virtual bool OnMessageReceived(const IPC::Message& msg);
+ static const ApiID kApiID = API_ID_PPB_FLASH_CLIPBOARD;
+
private:
// Message handlers.
- void OnMsgIsFormatAvailable(PP_Instance instance_id,
+ void OnMsgIsFormatAvailable(PP_Instance instance,
int clipboard_type,
int format,
bool* result);
- void OnMsgReadPlainText(PP_Instance instance_id,
+ void OnMsgReadPlainText(PP_Instance instance,
int clipboard_type,
SerializedVarReturnValue result);
- void OnMsgWritePlainText(PP_Instance instance_id,
+ void OnMsgWritePlainText(PP_Instance instance,
int clipboard_type,
SerializedVarReceiveInput text);
-
- // When this proxy is in the host side, this value caches the interface
- // pointer so we don't have to retrieve it from the dispatcher each time.
- // In the plugin, this value is always NULL.
- const PPB_Flash_Clipboard* ppb_flash_clipboard_impl_;
};
} // namespace proxy

Powered by Google App Engine
This is Rietveld 408576698