Implement NPNVsupportsCompositingCoreAnimationPluginsBool

Returns true when plugin compositing is enabled, so that plugins that dynamically query for composited CA support know it's safe to use CA.

Updates NPAPI headers to r14 of the upstream 'npapi-sdk' project headers, to pick up the new constant.

BUG=40997
TEST=HTML overlays should work with, e.g., the Google Earth plugin on 10.6+


Review URL: http://codereview.chromium.org/8805004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113370 0039d316-1c4b-4281-b951-d872f2087c98
parent 81f84994
......@@ -403,7 +403,7 @@ typedef enum {
, NPPVpluginCoreAnimationLayer = 1003
#endif
#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)
#if defined(MOZ_PLATFORM_MAEMO) && ((MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6))
, NPPVpluginWindowlessLocalBool = 2002
#endif
} NPPVariable;
......@@ -435,7 +435,9 @@ typedef enum {
NPNVprivateModeBool = 18,
NPNVsupportsAdvancedKeyHandling = 21
NPNVsupportsAdvancedKeyHandling = 21,
NPNVdocumentOrigin = 22
#if defined(XP_MACOSX)
/* Used for negotiating drawing models */
......@@ -453,8 +455,10 @@ typedef enum {
, NPNVsupportsCocoaBool = 3001 /* TRUE if the browser supports the Cocoa event model */
, NPNVsupportsUpdatedCocoaTextInputBool = 3002 /* TRUE if the browser supports the updated
Cocoa text input specification. */
, NPNVsupportsCompositingCoreAnimationPluginsBool = 74656 /* TRUE if the browser supports
CA model compositing */
#endif
#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)
#if defined(MOZ_PLATFORM_MAEMO) && ((MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6))
, NPNVSupportsWindowlessLocal = 2002
#endif
} NPNVariable;
......
......@@ -217,7 +217,7 @@ typedef struct _NPNetscapeFuncs {
* These can be called to retreive MIME information from the plugin dynamically
*
* Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way
* to get mime info from the plugin only on OSX and may not be supported
* to get mime info from the plugin only on OSX and may not be supported
* in furture version -- use NP_GetMIMEDescription instead
*/
enum
......
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* Copyright (c) 2004, Apple Computer, Inc. and The Mozilla Foundation.
* Copyright (c) 2004, Apple Computer, Inc. and The Mozilla Foundation.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
......@@ -16,7 +16,7 @@
* Foundation ("Mozilla") nor the names of their contributors may be used
* to endorse or promote products derived from this software without
* specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
......@@ -48,7 +48,7 @@ extern "C" {
objects. The API in this header does not assume the presence of a
user agent. That is, it can be used to bind C code to scripting
environments outside of the context of a user agent.
However, the normal use of the this API is in the context of a
scripting environment running in a browser or other user agent.
In particular it is used to support the extended Netscape
......@@ -359,7 +359,7 @@ void NPN_ReleaseObject(NPObject *npobj);
value, it will be supplied via the result NPVariant
argument. Successful calls will return true, false will be
returned in case of an error.
Calls made from plugin code to script must be made from the thread
on which the plugin was initialized.
*/
......
......@@ -69,7 +69,7 @@
#endif
#elif defined(bsdi) || defined(FREEBSD) || defined(OPENBSD)
/*
* BSD/OS, FreeBSD, and OpenBSD ship sys/types.h that define int32_t and
* BSD/OS, FreeBSD, and OpenBSD ship sys/types.h that define int32_t and
* u_int32_t.
*/
#include <sys/types.h>
......
......@@ -850,6 +850,13 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
rv = NPERR_NO_ERROR;
break;
}
case NPNVsupportsCompositingCoreAnimationPluginsBool: {
NPBool* supports_compositing = reinterpret_cast<NPBool*>(value);
*supports_compositing =
webkit::npapi::UsingCompositedCoreAnimationPlugins();
rv = NPERR_NO_ERROR;
break;
}
case NPNVsupportsUpdatedCocoaTextInputBool: {
// We support the clarifications to the Cocoa IME event spec, but since
// IME currently only works on 10.6, only answer true there.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment