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

Unified Diff: ppapi/thunk/ppb_instance_api.h

Issue 11359063: Refactor the way singleton-style resources are exposed via PPB_Instance (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/thunk/ppb_gamepad_thunk.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_instance_api.h
diff --git a/ppapi/thunk/ppb_instance_api.h b/ppapi/thunk/ppb_instance_api.h
index c5f26e60faa542df11b1a31825010cef56d53509..a89785c0a68c8aa9130f9c89d858c7664dba4795 100644
--- a/ppapi/thunk/ppb_instance_api.h
+++ b/ppapi/thunk/ppb_instance_api.h
@@ -21,6 +21,8 @@
#include "ppapi/c/private/pp_content_decryptor.h"
#include "ppapi/c/private/ppb_instance_private.h"
#include "ppapi/shared_impl/api_id.h"
+#include "ppapi/shared_impl/resource.h"
+#include "ppapi/shared_impl/singleton_resource_id.h"
// Windows headers interfere with this file.
#ifdef PostMessage
@@ -32,15 +34,13 @@ struct PP_DecryptedFrameInfo;
namespace ppapi {
+class Resource;
class TrackedCallback;
struct ViewData;
namespace thunk {
class PPB_Flash_API;
-class PPB_Flash_Clipboard_API;
-class PPB_Flash_Functions_API;
-class PPB_Gamepad_API;
class PPB_Instance_API {
public:
@@ -92,16 +92,13 @@ class PPB_Instance_API {
// Flash (Deprecated for Flash_Functions).
virtual PPB_Flash_API* GetFlashAPI() = 0;
- // Flash_Functions
- virtual PPB_Flash_Functions_API* GetFlashFunctionsAPI(
- PP_Instance instance) = 0;
- // Flash_Clipboard.
- virtual PPB_Flash_Clipboard_API* GetFlashClipboardAPI(
- PP_Instance instance) = 0;
-
- // Gamepad.
- virtual PPB_Gamepad_API* GetGamepadAPI(PP_Instance instance) = 0;
+ // This is an implementation-only function which grabs an instance of a
+ // "singleton resource". These are used to implement instance interfaces
+ // (functions which are associated with the instance itself as opposed to a
+ // resource).
+ virtual Resource* GetSingletonResource(
+ PP_Instance instance, SingletonResourceID id) = 0;
// InputEvent.
virtual int32_t RequestInputEvents(PP_Instance instance,
« no previous file with comments | « ppapi/thunk/ppb_gamepad_thunk.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698