summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/ppb_instance_proxy.h
diff options
context:
space:
mode:
authorraymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-29 17:59:19 +0000
committerraymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-29 17:59:19 +0000
commit109dcfb3cb1c4aebcd1c8c7f8b13c07fb2b45a75 (patch)
treee7a0088fd0e903db09f9465ae72f66892894c49a /ppapi/proxy/ppb_instance_proxy.h
parent79b5a8c91a073cff723a00d40ab4d0acb95294b1 (diff)
downloadchromium_src-109dcfb3cb1c4aebcd1c8c7f8b13c07fb2b45a75.zip
chromium_src-109dcfb3cb1c4aebcd1c8c7f8b13c07fb2b45a75.tar.gz
chromium_src-109dcfb3cb1c4aebcd1c8c7f8b13c07fb2b45a75.tar.bz2
Refactor the way singleton-style resources are exposed via PPB_Instance
Currently a lot of boilerplate needs to be added everytime we add a new singleton style resource and as we add more of them this will accumulate. This patch reduces the amount of code needed by exposing a GetSingletonResource function in PPB_Instance_API which takes an ID specifying what type of resource is needed. A new Enter type, EnterInstanceAPI, is provided which is templated on the singleton API you want access to. BUG= Review URL: https://codereview.chromium.org/11359063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170221 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppb_instance_proxy.h')
-rw-r--r--ppapi/proxy/ppb_instance_proxy.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/ppapi/proxy/ppb_instance_proxy.h b/ppapi/proxy/ppb_instance_proxy.h
index 9b4de32..fbdc694 100644
--- a/ppapi/proxy/ppb_instance_proxy.h
+++ b/ppapi/proxy/ppb_instance_proxy.h
@@ -15,6 +15,7 @@
#include "ppapi/proxy/proxy_completion_callback_factory.h"
#include "ppapi/shared_impl/host_resource.h"
#include "ppapi/shared_impl/ppb_instance_shared.h"
+#include "ppapi/shared_impl/singleton_resource_id.h"
#include "ppapi/thunk/ppb_instance_api.h"
#include "ppapi/utility/completion_callback_factory.h"
@@ -70,11 +71,8 @@ class PPB_Instance_Proxy : public InterfaceProxy,
virtual PP_Bool GetScreenSize(PP_Instance instance,
PP_Size* size) OVERRIDE;
virtual thunk::PPB_Flash_API* GetFlashAPI() OVERRIDE;
- virtual thunk::PPB_Flash_Functions_API* GetFlashFunctionsAPI(
- PP_Instance instance) OVERRIDE;
- virtual thunk::PPB_Flash_Clipboard_API* GetFlashClipboardAPI(
- PP_Instance instance) OVERRIDE;
- virtual thunk::PPB_Gamepad_API* GetGamepadAPI(PP_Instance instance) OVERRIDE;
+ virtual Resource* GetSingletonResource(PP_Instance instance,
+ SingletonResourceID id) OVERRIDE;
virtual int32_t RequestInputEvents(PP_Instance instance,
uint32_t event_classes) OVERRIDE;
virtual int32_t RequestFilteringInputEvents(PP_Instance instance,