summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/plugins')
-rw-r--r--webkit/glue/plugins/npapi_extension_thunk.cc61
-rw-r--r--webkit/glue/plugins/plugin_constants_win.h2
-rw-r--r--webkit/glue/plugins/plugin_list.cc2
-rw-r--r--webkit/glue/plugins/plugin_list.h2
-rw-r--r--webkit/glue/plugins/plugin_list_win.cc2
-rw-r--r--webkit/glue/plugins/webplugin_3d_device_delegate.h14
6 files changed, 80 insertions, 3 deletions
diff --git a/webkit/glue/plugins/npapi_extension_thunk.cc b/webkit/glue/plugins/npapi_extension_thunk.cc
index e07bff2..eee6c80 100644
--- a/webkit/glue/plugins/npapi_extension_thunk.cc
+++ b/webkit/glue/plugins/npapi_extension_thunk.cc
@@ -114,6 +114,26 @@ static NPError Device2DDestroyContext(NPP id,
return NPERR_GENERIC_ERROR;
}
+static NPError Device2DCreateBuffer(NPP id,
+ NPDeviceContext* context,
+ size_t size,
+ int32* buffer_id) {
+ return NPERR_GENERIC_ERROR;
+}
+
+static NPError Device2DDestroyBuffer(NPP id,
+ NPDeviceContext* context,
+ int32 buffer_id) {
+ return NPERR_GENERIC_ERROR;
+}
+
+static NPError Device2DMapBuffer(NPP id,
+ NPDeviceContext* context,
+ int32 buffer_id,
+ NPDeviceBuffer* buffer) {
+ return NPERR_GENERIC_ERROR;
+}
+
// 3D device API ---------------------------------------------------------------
static NPError Device3DQueryCapability(NPP id, int32 capability, int32* value) {
@@ -196,6 +216,41 @@ static NPError Device3DDestroyContext(NPP id,
return NPERR_GENERIC_ERROR;
}
+static NPError Device3DCreateBuffer(NPP id,
+ NPDeviceContext* context,
+ size_t size,
+ int32* buffer_id) {
+ scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ if (plugin) {
+ return plugin->webplugin()->delegate()->Device3DCreateBuffer(
+ static_cast<NPDeviceContext3D*>(context), size, buffer_id);
+ }
+ return NPERR_GENERIC_ERROR;
+}
+
+static NPError Device3DDestroyBuffer(NPP id,
+ NPDeviceContext* context,
+ int32 buffer_id) {
+ scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ if (plugin) {
+ return plugin->webplugin()->delegate()->Device3DDestroyBuffer(
+ static_cast<NPDeviceContext3D*>(context), buffer_id);
+ }
+ return NPERR_GENERIC_ERROR;
+}
+
+static NPError Device3DMapBuffer(NPP id,
+ NPDeviceContext* context,
+ int32 buffer_id,
+ NPDeviceBuffer* buffer) {
+ scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ if (plugin) {
+ return plugin->webplugin()->delegate()->Device3DMapBuffer(
+ static_cast<NPDeviceContext3D*>(context), buffer_id, buffer);
+ }
+ return NPERR_GENERIC_ERROR;
+}
+
// -----------------------------------------------------------------------------
static NPDevice* AcquireDevice(NPP id, NPDeviceID device_id) {
@@ -207,6 +262,9 @@ static NPDevice* AcquireDevice(NPP id, NPDeviceID device_id) {
Device2DGetStateContext,
Device2DFlushContext,
Device2DDestroyContext,
+ Device2DCreateBuffer,
+ Device2DDestroyBuffer,
+ Device2DMapBuffer,
};
static NPDevice device_3d = {
Device3DQueryCapability,
@@ -216,6 +274,9 @@ static NPDevice* AcquireDevice(NPP id, NPDeviceID device_id) {
Device3DGetStateContext,
Device3DFlushContext,
Device3DDestroyContext,
+ Device3DCreateBuffer,
+ Device3DDestroyBuffer,
+ Device3DMapBuffer,
};
switch (device_id) {
diff --git a/webkit/glue/plugins/plugin_constants_win.h b/webkit/glue/plugins/plugin_constants_win.h
index b708706..9913e5d 100644
--- a/webkit/glue/plugins/plugin_constants_win.h
+++ b/webkit/glue/plugins/plugin_constants_win.h
@@ -36,4 +36,6 @@
#define kJavaPlugin1 L"npjp2.dll"
#define kJavaPlugin2 L"npdeploytk.dll"
+#define kGPUPluginMimeType "application/vnd.google.chrome.gpu-plugin"
+
#endif // WEBKIT_GLUE_PLUGIN_PLUGIN_LIST_H_
diff --git a/webkit/glue/plugins/plugin_list.cc b/webkit/glue/plugins/plugin_list.cc
index 2109951..ec4a80b 100644
--- a/webkit/glue/plugins/plugin_list.cc
+++ b/webkit/glue/plugins/plugin_list.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/webkit/glue/plugins/plugin_list.h b/webkit/glue/plugins/plugin_list.h
index 822ac05..ec82fd0 100644
--- a/webkit/glue/plugins/plugin_list.h
+++ b/webkit/glue/plugins/plugin_list.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/webkit/glue/plugins/plugin_list_win.cc b/webkit/glue/plugins/plugin_list_win.cc
index b762a8f..25a3be4 100644
--- a/webkit/glue/plugins/plugin_list_win.cc
+++ b/webkit/glue/plugins/plugin_list_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/webkit/glue/plugins/webplugin_3d_device_delegate.h b/webkit/glue/plugins/webplugin_3d_device_delegate.h
index 78dbe0e..42dc300 100644
--- a/webkit/glue/plugins/webplugin_3d_device_delegate.h
+++ b/webkit/glue/plugins/webplugin_3d_device_delegate.h
@@ -46,6 +46,20 @@ class WebPlugin3DDeviceDelegate {
virtual NPError Device3DDestroyContext(NPDeviceContext3D* context) {
return NPERR_GENERIC_ERROR;
}
+ virtual NPError Device3DCreateBuffer(NPDeviceContext3D* context,
+ size_t size,
+ int32* id) {
+ return NPERR_GENERIC_ERROR;
+ }
+ virtual NPError Device3DDestroyBuffer(NPDeviceContext3D* context,
+ int32 id) {
+ return NPERR_GENERIC_ERROR;
+ }
+ virtual NPError Device3DMapBuffer(NPDeviceContext3D* context,
+ int32 id,
+ NPDeviceBuffer* buffer) {
+ return NPERR_GENERIC_ERROR;
+ }
protected:
WebPlugin3DDeviceDelegate() {}