diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-10 00:50:22 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-10 00:50:22 +0000 |
commit | e8f7a187aa77cd3898e9dc7f382a89d0bc6ed359 (patch) | |
tree | 193b2c73d4118871f64bed9f2620f0f00ceb83c9 /gpu | |
parent | 60ae33e3b2d15497bb524c923adbcc8f8087494c (diff) | |
download | chromium_src-e8f7a187aa77cd3898e9dc7f382a89d0bc6ed359.zip chromium_src-e8f7a187aa77cd3898e9dc7f382a89d0bc6ed359.tar.gz chromium_src-e8f7a187aa77cd3898e9dc7f382a89d0bc6ed359.tar.bz2 |
Deleted WebPluginDelegatePepper and everything dependent on it.
This removes support for pepper v1 trusted plugins.
TEST=pepper v2 plugin runs, npapi plugin runs, trybots
BUG=none
Review URL: http://codereview.chromium.org/6646025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77568 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/demos/demos.gyp | 148 | ||||
-rw-r--r-- | gpu/demos/framework/main_pepper.cc | 183 |
2 files changed, 0 insertions, 331 deletions
diff --git a/gpu/demos/demos.gyp b/gpu/demos/demos.gyp index 767d86b..2e2ead0 100644 --- a/gpu/demos/demos.gyp +++ b/gpu/demos/demos.gyp @@ -57,70 +57,6 @@ ], }, { - 'target_name': 'gpu_demo_framework_pepper', - 'type': 'static_library', - # This target injects a bunch of source files to direct dependents. - # If the dependent is a none-type target (like all.gyp), gyp will - # generate error due to these injected source files. Workaround this - # problem by preventing it from being selected by demos.gyp:*. - # TODO(neb): remove source injection and this flag. - 'suppress_wildcard': 1, - 'dependencies': [ - 'gpu_demo_framework', - '../gpu.gyp:pgl', - ], - 'include_dirs': ['../..'], - 'sources': [ - 'framework/plugin.cc', - 'framework/plugin.h', - ], - 'direct_dependent_settings': { - 'include_dirs': ['../..'], - 'sources': ['framework/main_pepper.cc'], - 'run_as': { - 'conditions': [ - ['OS=="mac"', { - 'action': [ - '<(PRODUCT_DIR)/Chromium.app/Contents/MacOS/Chromium', - '--no-sandbox', - '--internal-pepper', - '--enable-gpu-plugin', - '--load-plugin=<(PRODUCT_DIR)/$(PRODUCT_NAME).plugin', - 'file://$(SOURCE_ROOT)/pepper_gpu_demo.html', - ], - }, { # OS != "mac" - 'action': [ - '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)chrome<(EXECUTABLE_SUFFIX)', - '--no-sandbox', - '--internal-pepper', - '--enable-gpu-plugin', - '--load-plugin=$(TargetPath)', - 'file://$(ProjectDir)pepper_gpu_demo.html', - ], - }], - ], - }, - 'conditions': [ - ['OS=="win"', { - 'sources': [ - 'framework/plugin.def', - 'framework/plugin.rc', - ], - }], - ['OS=="mac"', { - 'sources': [ - 'framework/Plugin_Info.plist', - ], - 'xcode_settings': { - 'INFOPLIST_FILE': 'framework/Plugin_Info.plist', - }, - 'mac_bundle': 1, - 'product_extension': 'plugin', - }], - ], - }, - }, - { 'target_name': 'gpu_demo_framework_ppapi', 'type': 'static_library', 'dependencies': [ @@ -270,90 +206,6 @@ ['enable_pepper_demos==1', { 'targets': [ { - 'target_name': 'hello_triangle_pepper', - 'type': 'loadable_module', - 'dependencies': [ - 'gpu_demo_framework_pepper', - '../../third_party/gles2_book/gles2_book.gyp:hello_triangle', - ], - 'sources': [ - 'gles2_book/example.h', - 'gles2_book/demo_hello_triangle.cc', - ], - }, - { - 'target_name': 'mip_map_2d_pepper', - 'type': 'loadable_module', - 'dependencies': [ - 'gpu_demo_framework_pepper', - '../../third_party/gles2_book/gles2_book.gyp:mip_map_2d', - ], - 'sources': [ - 'gles2_book/example.h', - 'gles2_book/demo_mip_map_2d.cc', - ], - }, - { - 'target_name': 'simple_texture_2d_pepper', - 'type': 'loadable_module', - 'dependencies': [ - 'gpu_demo_framework_pepper', - '../../third_party/gles2_book/gles2_book.gyp:simple_texture_2d', - ], - 'sources': [ - 'gles2_book/example.h', - 'gles2_book/demo_simple_texture_2d.cc', - ], - }, - { - 'target_name': 'simple_texture_cubemap_pepper', - 'type': 'loadable_module', - 'dependencies': [ - 'gpu_demo_framework_pepper', - '../../third_party/gles2_book/gles2_book.gyp:simple_texture_cubemap', - ], - 'sources': [ - 'gles2_book/example.h', - 'gles2_book/demo_simple_texture_cubemap.cc', - ], - }, - { - 'target_name': 'simple_vertex_shader_pepper', - 'type': 'loadable_module', - 'dependencies': [ - 'gpu_demo_framework_pepper', - '../../third_party/gles2_book/gles2_book.gyp:simple_vertex_shader', - ], - 'sources': [ - 'gles2_book/example.h', - 'gles2_book/demo_simple_vertex_shader.cc', - ], - }, - { - 'target_name': 'stencil_test_pepper', - 'type': 'loadable_module', - 'dependencies': [ - 'gpu_demo_framework_pepper', - '../../third_party/gles2_book/gles2_book.gyp:stencil_test', - ], - 'sources': [ - 'gles2_book/example.h', - 'gles2_book/demo_stencil_test.cc', - ], - }, - { - 'target_name': 'texture_wrap_pepper', - 'type': 'loadable_module', - 'dependencies': [ - 'gpu_demo_framework_pepper', - '../../third_party/gles2_book/gles2_book.gyp:texture_wrap', - ], - 'sources': [ - 'gles2_book/example.h', - 'gles2_book/demo_texture_wrap.cc', - ], - }, - { 'target_name': 'hello_triangle_ppapi', 'type': 'loadable_module', 'variables': { 'chromium_code': 0, }, diff --git a/gpu/demos/framework/main_pepper.cc b/gpu/demos/framework/main_pepper.cc deleted file mode 100644 index 2f50595..0000000 --- a/gpu/demos/framework/main_pepper.cc +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) 2010 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. - -#include "gpu/demos/framework/plugin.h" -#include "gpu/pgl/pgl.h" -#include "third_party/npapi/bindings/nphostapi.h" - -#if __GNUC__ >= 4 -#define EXPORT __attribute__ ((visibility("default"))) -#else -// We use .def file to export symbols on OS_WIN. We could potentially use -// __declspec(dllexport) but API_CALL always adds something to the function -// signature even inside extern "C" {} -#define EXPORT -#endif // GNUC - -namespace gpu { -namespace demos { -// NPP entry points. -NPError NPP_New(NPMIMEType pluginType, - NPP instance, - uint16 mode, - int16 argc, char* argn[], char* argv[], - NPSavedData* saved) { - if (g_browser->version < NPVERS_HAS_PLUGIN_THREAD_ASYNC_CALL) { - return NPERR_INCOMPATIBLE_VERSION_ERROR; - } - - Plugin* plugin = static_cast<Plugin*>( - g_browser->createobject(instance, Plugin::GetPluginClass())); - instance->pdata = plugin; - plugin->New(pluginType, argc, argn, argv); - - return NPERR_NO_ERROR; -} - -NPError NPP_Destroy(NPP instance, NPSavedData** save) { - Plugin* plugin = static_cast<Plugin*>(instance->pdata); - if (plugin) g_browser->releaseobject(plugin); - - return NPERR_NO_ERROR; -} - -NPError NPP_SetWindow(NPP instance, NPWindow* window) { - Plugin* plugin = static_cast<Plugin*>(instance->pdata); - if (plugin) plugin->SetWindow(*window); - - return NPERR_NO_ERROR; -} - -NPError NPP_NewStream(NPP instance, - NPMIMEType type, - NPStream* stream, - NPBool seekable, - uint16* stype) { - *stype = NP_ASFILEONLY; - return NPERR_NO_ERROR; -} - -NPError NPP_DestroyStream(NPP instance, NPStream* stream, NPReason reason) { - return NPERR_NO_ERROR; -} - -void NPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname) { -} - -int32 NPP_Write(NPP instance, - NPStream* stream, - int32 offset, - int32 len, - void* buffer) { - return 0; -} - -int32 NPP_WriteReady(NPP instance, NPStream* stream) { - return 0; -} - -void NPP_Print(NPP instance, NPPrint* platformPrint) { -} - -int16 NPP_HandleEvent(NPP instance, void* event) { - Plugin* plugin = static_cast<Plugin*>(instance->pdata); - - if (plugin) - return plugin->HandleEvent(*static_cast<NPPepperEvent*>(event)); - - return 0; -} - -void NPP_URLNotify(NPP instance, const char* url, NPReason reason, - void* notify_data) { -} - -NPError NPP_GetValue(NPP instance, NPPVariable variable, void* value) { - NPError err = NPERR_NO_ERROR; - - switch (variable) { -#if defined(OS_LINUX) - case NPPVpluginNameString: - *(static_cast<const char**>(value)) = "Pepper GPU Demo"; - break; - case NPPVpluginDescriptionString: - *(static_cast<const char**>(value)) = "Pepper plug-in for GPU demo."; - break; - case NPPVpluginNeedsXEmbed: - *(static_cast<NPBool*>(value)) = true; - break; -#endif - case NPPVpluginScriptableNPObject: { - void** v = static_cast<void**>(value); - Plugin* plugin = static_cast<Plugin*>(instance->pdata); - // Return value is expected to be retained - g_browser->retainobject(plugin); - *v = plugin; - break; - } - default: - err = NPERR_GENERIC_ERROR; - break; - } - - return err; -} - -NPError NPP_SetValue(NPP instance, NPNVariable variable, void* value) { - return NPERR_GENERIC_ERROR; -} -} // namespace demos -} // namespace gpu - -// NP entry points -extern "C" { -EXPORT NPError API_CALL NP_GetEntryPoints(NPPluginFuncs* plugin_funcs) { - plugin_funcs->version = NPVERS_HAS_PLUGIN_THREAD_ASYNC_CALL; - plugin_funcs->size = sizeof(plugin_funcs); - plugin_funcs->newp = gpu::demos::NPP_New; - plugin_funcs->destroy = gpu::demos::NPP_Destroy; - plugin_funcs->setwindow = gpu::demos::NPP_SetWindow; - plugin_funcs->newstream = gpu::demos::NPP_NewStream; - plugin_funcs->destroystream = gpu::demos::NPP_DestroyStream; - plugin_funcs->asfile = gpu::demos::NPP_StreamAsFile; - plugin_funcs->writeready = gpu::demos::NPP_WriteReady; - plugin_funcs->write = gpu::demos::NPP_Write; - plugin_funcs->print = gpu::demos::NPP_Print; - plugin_funcs->event = gpu::demos::NPP_HandleEvent; - plugin_funcs->urlnotify = gpu::demos::NPP_URLNotify; - plugin_funcs->getvalue = gpu::demos::NPP_GetValue; - plugin_funcs->setvalue = gpu::demos::NPP_SetValue; - - return NPERR_NO_ERROR; -} - -EXPORT NPError API_CALL NP_Initialize(NPNetscapeFuncs* browser_funcs -#if defined(OS_LINUX) - , NPPluginFuncs* plugin_funcs -#endif // OS_LINUX - ) { - gpu::demos::g_browser = browser_funcs; - pglInitialize(); - -#if defined(OS_LINUX) - NP_GetEntryPoints(plugin_funcs); -#endif // OS_LINUX - return NPERR_NO_ERROR; -} - -EXPORT void API_CALL NP_Shutdown() { - pglTerminate(); -} - -#if defined(OS_LINUX) -EXPORT NPError API_CALL NP_GetValue(NPP instance, NPPVariable variable, - void* value) { - return gpu::demos::NPP_GetValue(instance, variable, value); -} - -EXPORT const char* API_CALL NP_GetMIMEDescription() { - return "pepper-application/x-gpu-demo::Pepper GPU Demo"; -} -#endif // OS_LINUX -} // extern "C" |