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

Unified Diff: ppapi/proxy/ppb_instance_proxy.cc

Issue 11225021: Move flash clipboard to the new proxy and add custom format support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.h ('k') | ppapi/shared_impl/flash_clipboard_format_registry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_instance_proxy.cc
diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc
index 5f10cf8ba2a6ab285411afb7a1b17c47c87c736f..836117fb726e9ff569821b2fb57e6042828778b2 100644
--- a/ppapi/proxy/ppb_instance_proxy.cc
+++ b/ppapi/proxy/ppb_instance_proxy.cc
@@ -15,6 +15,7 @@
#include "ppapi/c/private/pp_content_decryptor.h"
#include "ppapi/proxy/content_decryptor_private_serializer.h"
#include "ppapi/proxy/enter_proxy.h"
+#include "ppapi/proxy/flash_clipboard_resource.h"
#include "ppapi/proxy/flash_resource.h"
#include "ppapi/proxy/gamepad_resource.h"
#include "ppapi/proxy/host_dispatcher.h"
@@ -321,6 +322,8 @@ thunk::PPB_Flash_API* PPB_Instance_Proxy::GetFlashAPI() {
return static_cast<PPB_Flash_Proxy*>(ip);
}
+// TODO(raymes): We can most likely cut down this boilerplate for grabbing
+// singleton resource APIs.
thunk::PPB_Flash_Functions_API* PPB_Instance_Proxy::GetFlashFunctionsAPI(
PP_Instance instance) {
#if !defined(OS_NACL) && !defined(NACL_WIN64)
@@ -343,6 +346,29 @@ thunk::PPB_Flash_Functions_API* PPB_Instance_Proxy::GetFlashFunctionsAPI(
#endif // !defined(OS_NACL) && !defined(NACL_WIN64)
}
+thunk::PPB_Flash_Clipboard_API* PPB_Instance_Proxy::GetFlashClipboardAPI(
+ PP_Instance instance) {
+#if !defined(OS_NACL) && !defined(NACL_WIN64)
+ InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())->
+ GetInstanceData(instance);
+ if (!data)
+ return NULL;
+
+ if (!data->flash_clipboard_resource.get()) {
+ Connection connection(
+ PluginGlobals::Get()->plugin_proxy_delegate()->GetBrowserSender(),
+ dispatcher());
+ data->flash_clipboard_resource =
+ new FlashClipboardResource(connection, instance);
+ }
+ return data->flash_clipboard_resource.get();
+#else
+ // Flash functions aren't implemented for nacl.
+ NOTIMPLEMENTED();
+ return NULL;
+#endif // !defined(OS_NACL) && !defined(NACL_WIN64)
+}
+
thunk::PPB_Gamepad_API* PPB_Instance_Proxy::GetGamepadAPI(
PP_Instance instance) {
InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())->
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.h ('k') | ppapi/shared_impl/flash_clipboard_format_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698