summaryrefslogtreecommitdiffstats
path: root/webkit/port
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-29 20:06:26 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-29 20:06:26 +0000
commit7cdaf8391adb65855e4babaaa75636cd29540f50 (patch)
treef0bc6b0c0b9e3da1fd978b9b801627ecf064b8fe /webkit/port
parent7497d26c7068cd0f193847464e1a610f8183ea8c (diff)
downloadchromium_src-7cdaf8391adb65855e4babaaa75636cd29540f50.zip
chromium_src-7cdaf8391adb65855e4babaaa75636cd29540f50.tar.gz
chromium_src-7cdaf8391adb65855e4babaaa75636cd29540f50.tar.bz2
Modify npruntime_impl.h to be useful. Previously, we were not using
this file, but WebCore includes it, and so we can avoid some WebCore forking by implementing npruntime_impl.h appropriately. R=dglazkov Review URL: http://codereview.chromium.org/19472 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8906 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port')
-rw-r--r--webkit/port/bindings/v8/npruntime_impl.h84
1 files changed, 33 insertions, 51 deletions
diff --git a/webkit/port/bindings/v8/npruntime_impl.h b/webkit/port/bindings/v8/npruntime_impl.h
index 58ec490..3224565 100644
--- a/webkit/port/bindings/v8/npruntime_impl.h
+++ b/webkit/port/bindings/v8/npruntime_impl.h
@@ -1,61 +1,43 @@
/*
- * Copyright (C) 2004 Apple Computer, Inc. All rights reserved.
- *
+ * Copyright (c) 2008, 2009, Google Inc. 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
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef _NP_RUNTIME_IMPL_H_
-#define _NP_RUNTIME_IMPL_H_
+#ifndef npruntime_impl_h
+#define npruntime_impl_h
-#include "third_party/npapi/bindings/npruntime.h"
+#include "bindings/npruntime.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern void _NPN_ReleaseVariantValue(NPVariant *variant);
-extern NPIdentifier _NPN_GetStringIdentifier(const NPUTF8 *name);
-extern void _NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, NPIdentifier *identifiers);
-extern NPIdentifier _NPN_GetIntIdentifier(int32_t intid);
-extern bool _NPN_IdentifierIsString(NPIdentifier identifier);
-extern NPUTF8 *_NPN_UTF8FromIdentifier(NPIdentifier identifier);
-extern int32_t _NPN_IntFromIdentifier(NPIdentifier identifier);
-extern NPObject *_NPN_CreateObject(NPP npp, NPClass *aClass);
-extern NPObject *_NPN_RetainObject(NPObject *obj);
-extern void _NPN_ReleaseObject(NPObject *obj);
-extern void _NPN_DeallocateObject(NPObject *obj);
-extern bool _NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result);
-extern bool _NPN_InvokeDefault(NPP npp, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result);
-extern bool _NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script, NPVariant *result);
-extern bool _NPN_GetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, NPVariant *result);
-extern bool _NPN_SetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, const NPVariant *value);
-extern bool _NPN_RemoveProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName);
-extern bool _NPN_HasProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName);
-extern bool _NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName);
-extern void _NPN_SetException(NPObject *obj, const NPUTF8 *message);
-extern bool _NPN_Enumerate(NPP npp, NPObject *npobj, NPIdentifier **identifier, uint32_t *count);
+// This file exists to support WebCore, which expects to be able to call upon
+// portions of the NPRuntime implementation.
-#ifdef __cplusplus
-} /* end extern "C" */
-#endif
+// A simple mapping for now. FIXME We should probably just adopt the
+// underscore prefix as our naming convention too.
+#define _NPN_ReleaseObject NPN_ReleaseObject
#endif