summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webplugin_delegate.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-01 23:07:02 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-01 23:07:02 +0000
commit66b4e8dfc5cce75c998889d5b968ecb72a204447 (patch)
tree215d020b5bb8a5cfa43debf580e9bd3d55091b77 /webkit/glue/webplugin_delegate.h
parent3984b4b1edee2b14b0ebd41d31fc9fedfc7a0ef9 (diff)
downloadchromium_src-66b4e8dfc5cce75c998889d5b968ecb72a204447.zip
chromium_src-66b4e8dfc5cce75c998889d5b968ecb72a204447.tar.gz
chromium_src-66b4e8dfc5cce75c998889d5b968ecb72a204447.tar.bz2
Update the Pepper APIs to the latest spec for the 2D demo plugin.
This also adds the npapi headers to the npapi.gyp file since I got tired of Visual Studio not finding the files. This removes the "open file in sandbox" feature which it doesn't look like we will use. One more significant change is that I changed to including pepper.h in all cases, even when pepper is disabled. We used to have a forward declare in npapi.h for the structs in question, but we'll be adding a lot more structs for the different contexts and I don't think this will scale. I think its OK fo rthe pepper API declarations to be available when Pepper isn't enabled. BUT=none TEST=none Review URL: http://codereview.chromium.org/453015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33501 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webplugin_delegate.h')
-rw-r--r--webkit/glue/webplugin_delegate.h36
1 files changed, 26 insertions, 10 deletions
diff --git a/webkit/glue/webplugin_delegate.h b/webkit/glue/webplugin_delegate.h
index 2b9c5bb..5a724f1 100644
--- a/webkit/glue/webplugin_delegate.h
+++ b/webkit/glue/webplugin_delegate.h
@@ -12,7 +12,7 @@
#include "base/string16.h"
#include "build/build_config.h"
#include "third_party/npapi/bindings/npapi.h"
-#include "webkit/glue/pepper/pepper.h"
+#include "third_party/npapi/bindings/npapi_extensions.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCanvas.h"
class FilePath;
@@ -127,22 +127,38 @@ class WebPluginDelegate {
intptr_t notify_data,
intptr_t stream) = 0;
- // The following two methods are for use in implementing Pepper renderers.
+ // The following methods are for use in implementing Pepper renderers.
// They should not be called outside of that context.
- virtual NPError InitializeRenderContext(NPRenderType type,
- NPRenderContext* context) {
+
+ // Pepper 2D device API.
+ virtual NPError Device2DQueryCapability(int32 capability, int32* value) {
return NPERR_GENERIC_ERROR;
}
-
- virtual NPError DestroyRenderContext(NPRenderContext* context) {
+ virtual NPError Device2DQueryConfig(const NPDeviceContext2DConfig* request,
+ NPDeviceContext2DConfig* obtain) {
return NPERR_GENERIC_ERROR;
}
-
- virtual NPError FlushRenderContext(NPRenderContext* context) {
+ virtual NPError Device2DInitializeContext(
+ const NPDeviceContext2DConfig* config,
+ NPDeviceContext2D* context) {
return NPERR_GENERIC_ERROR;
}
-
- virtual NPError OpenFileInSandbox(const char* file_name, void** handle) {
+ virtual NPError Device2DSetStateContext(NPDeviceContext2D* context,
+ int32 state,
+ int32 value) {
+ return NPERR_GENERIC_ERROR;
+ }
+ virtual NPError Device2DGetStateContext(NPDeviceContext2D* context,
+ int32 state,
+ int32* value) {
+ return NPERR_GENERIC_ERROR;
+ }
+ virtual NPError Device2DFlushContext(NPDeviceContext2D* context,
+ NPDeviceFlushContextCallbackPtr callback,
+ void* user_data) {
+ return NPERR_GENERIC_ERROR;
+ }
+ virtual NPError Device2DDestroyContext(NPDeviceContext2D* context) {
return NPERR_GENERIC_ERROR;
}
};