summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorneb@chromium.org <neb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-07 19:40:54 +0000
committerneb@chromium.org <neb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-07 19:40:54 +0000
commit37027147e508f367a23f7d392ef3d453a96d065b (patch)
tree7458f1cc528957c93a2d6aaa14913761cf0ca658 /webkit
parentf7b28d07ca2310391c23ad415668bb7a24ab78ef (diff)
downloadchromium_src-37027147e508f367a23f7d392ef3d453a96d065b.zip
chromium_src-37027147e508f367a23f7d392ef3d453a96d065b.tar.gz
chromium_src-37027147e508f367a23f7d392ef3d453a96d065b.tar.bz2
Fix up PPAPI renames in Chrome.
BUG=57631 TEST=ppapi/tests pass Review URL: http://codereview.chromium.org/3537011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61830 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/plugins/pepper_char_set.cc2
-rw-r--r--webkit/glue/plugins/pepper_file_ref.cc6
-rw-r--r--webkit/glue/plugins/pepper_font.cc5
-rw-r--r--webkit/glue/plugins/pepper_plugin_instance.cc20
-rw-r--r--webkit/glue/plugins/pepper_plugin_module.cc6
-rw-r--r--webkit/glue/plugins/pepper_plugin_object.cc26
-rw-r--r--webkit/glue/plugins/pepper_plugin_object.h12
-rw-r--r--webkit/glue/plugins/pepper_private.cc2
-rw-r--r--webkit/glue/plugins/pepper_url_response_info.cc4
-rw-r--r--webkit/glue/plugins/pepper_var.cc94
-rw-r--r--webkit/glue/plugins/pepper_var.h6
11 files changed, 92 insertions, 91 deletions
diff --git a/webkit/glue/plugins/pepper_char_set.cc b/webkit/glue/plugins/pepper_char_set.cc
index 1e5fc0a..1518069 100644
--- a/webkit/glue/plugins/pepper_char_set.cc
+++ b/webkit/glue/plugins/pepper_char_set.cc
@@ -143,7 +143,7 @@ uint16_t* CharSetToUTF16(const char* input, uint32_t input_len,
PP_Var GetDefaultCharSet(PP_Module pp_module) {
PluginModule* module = PluginModule::FromPPModule(pp_module);
if (!module)
- return PP_MakeVoid();
+ return PP_MakeUndefined();
std::string encoding =
module->GetSomeInstance()->delegate()->GetDefaultEncoding();
diff --git a/webkit/glue/plugins/pepper_file_ref.cc b/webkit/glue/plugins/pepper_file_ref.cc
index 7cb65a4e..971a36e 100644
--- a/webkit/glue/plugins/pepper_file_ref.cc
+++ b/webkit/glue/plugins/pepper_file_ref.cc
@@ -77,17 +77,17 @@ PP_FileSystemType_Dev GetFileSystemType(PP_Resource file_ref_id) {
PP_Var GetName(PP_Resource file_ref_id) {
scoped_refptr<FileRef> file_ref(Resource::GetAs<FileRef>(file_ref_id));
if (!file_ref)
- return PP_MakeVoid();
+ return PP_MakeUndefined();
return StringVar::StringToPPVar(file_ref->module(), file_ref->GetName());
}
PP_Var GetPath(PP_Resource file_ref_id) {
scoped_refptr<FileRef> file_ref(Resource::GetAs<FileRef>(file_ref_id));
if (!file_ref)
- return PP_MakeVoid();
+ return PP_MakeUndefined();
if (file_ref->file_system_type() == PP_FILESYSTEMTYPE_EXTERNAL)
- return PP_MakeVoid();
+ return PP_MakeUndefined();
return StringVar::StringToPPVar(file_ref->module(), file_ref->path());
}
diff --git a/webkit/glue/plugins/pepper_font.cc b/webkit/glue/plugins/pepper_font.cc
index 82bf369..94e9ac7 100644
--- a/webkit/glue/plugins/pepper_font.cc
+++ b/webkit/glue/plugins/pepper_font.cc
@@ -33,7 +33,8 @@ namespace {
bool IsPPFontDescriptionValid(const PP_FontDescription_Dev& desc) {
// Check validity of UTF-8.
- if (desc.face.type != PP_VARTYPE_STRING && desc.face.type != PP_VARTYPE_VOID)
+ if (desc.face.type != PP_VARTYPE_STRING &&
+ desc.face.type != PP_VARTYPE_UNDEFINED)
return false;
// Check enum ranges.
@@ -198,7 +199,7 @@ const PPB_Font_Dev* Font::GetInterface() {
bool Font::Describe(PP_FontDescription_Dev* description,
PP_FontMetrics_Dev* metrics) {
- if (description->face.type != PP_VARTYPE_VOID)
+ if (description->face.type != PP_VARTYPE_UNDEFINED)
return false;
WebFontDescription web_desc = font_->fontDescription();
diff --git a/webkit/glue/plugins/pepper_plugin_instance.cc b/webkit/glue/plugins/pepper_plugin_instance.cc
index d9e60ae..cadf4de 100644
--- a/webkit/glue/plugins/pepper_plugin_instance.cc
+++ b/webkit/glue/plugins/pepper_plugin_instance.cc
@@ -143,14 +143,14 @@ void RectToPPRect(const gfx::Rect& input, PP_Rect* output) {
PP_Var GetWindowObject(PP_Instance instance_id) {
PluginInstance* instance = PluginInstance::FromPPInstance(instance_id);
if (!instance)
- return PP_MakeVoid();
+ return PP_MakeUndefined();
return instance->GetWindowObject();
}
PP_Var GetOwnerElementObject(PP_Instance instance_id) {
PluginInstance* instance = PluginInstance::FromPPInstance(instance_id);
if (!instance)
- return PP_MakeVoid();
+ return PP_MakeUndefined();
return instance->GetOwnerElementObject();
}
@@ -173,7 +173,7 @@ PP_Var ExecuteScript(PP_Instance instance_id,
PP_Var* exception) {
PluginInstance* instance = PluginInstance::FromPPInstance(instance_id);
if (!instance)
- return PP_MakeVoid();
+ return PP_MakeUndefined();
return instance->ExecuteScript(script, exception);
}
@@ -348,18 +348,18 @@ void PluginInstance::InvalidateRect(const gfx::Rect& rect) {
PP_Var PluginInstance::GetWindowObject() {
if (!container_)
- return PP_MakeVoid();
+ return PP_MakeUndefined();
WebFrame* frame = container_->element().document().frame();
if (!frame)
- return PP_MakeVoid();
+ return PP_MakeUndefined();
return ObjectVar::NPObjectToPPVar(module(), frame->windowObject());
}
PP_Var PluginInstance::GetOwnerElementObject() {
if (!container_)
- return PP_MakeVoid();
+ return PP_MakeUndefined();
return ObjectVar::NPObjectToPPVar(module(),
container_->scriptableObjectForElement());
}
@@ -415,13 +415,13 @@ bool PluginInstance::SetCursor(PP_CursorType_Dev type) {
PP_Var PluginInstance::ExecuteScript(PP_Var script, PP_Var* exception) {
TryCatch try_catch(module(), exception);
if (try_catch.has_exception())
- return PP_MakeVoid();
+ return PP_MakeUndefined();
// Convert the script into an inconvenient NPString object.
scoped_refptr<StringVar> script_string(StringVar::FromPPVar(script));
if (!script_string) {
try_catch.SetException("Script param to ExecuteScript must be a string.");
- return PP_MakeVoid();
+ return PP_MakeUndefined();
}
NPString np_script;
np_script.UTF8Characters = script_string->value().c_str();
@@ -431,7 +431,7 @@ PP_Var PluginInstance::ExecuteScript(PP_Var script, PP_Var* exception) {
WebFrame* frame = container_->element().document().frame();
if (!frame) {
try_catch.SetException("No frame to execute script in.");
- return PP_MakeVoid();
+ return PP_MakeUndefined();
}
NPVariant result;
@@ -442,7 +442,7 @@ PP_Var PluginInstance::ExecuteScript(PP_Var script, PP_Var* exception) {
// doesn't actually catch this exception.
try_catch.SetException("Exception caught");
WebBindings::releaseVariantValue(&result);
- return PP_MakeVoid();
+ return PP_MakeUndefined();
}
PP_Var ret = Var::NPVariantToPPVar(module_, &result);
diff --git a/webkit/glue/plugins/pepper_plugin_module.cc b/webkit/glue/plugins/pepper_plugin_module.cc
index ea58d5628..99047bf 100644
--- a/webkit/glue/plugins/pepper_plugin_module.cc
+++ b/webkit/glue/plugins/pepper_plugin_module.cc
@@ -32,6 +32,7 @@
#include "third_party/ppapi/c/dev/ppb_url_request_info_dev.h"
#include "third_party/ppapi/c/dev/ppb_url_response_info_dev.h"
#include "third_party/ppapi/c/dev/ppb_url_util_dev.h"
+#include "third_party/ppapi/c/dev/ppb_var_deprecated.h"
#include "third_party/ppapi/c/dev/ppb_video_decoder_dev.h"
#include "third_party/ppapi/c/dev/ppb_widget_dev.h"
#include "third_party/ppapi/c/dev/ppb_zoom_dev.h"
@@ -43,7 +44,6 @@
#include "third_party/ppapi/c/ppb_graphics_2d.h"
#include "third_party/ppapi/c/ppb_image_data.h"
#include "third_party/ppapi/c/ppb_instance.h"
-#include "third_party/ppapi/c/ppb_var.h"
#include "third_party/ppapi/c/ppp.h"
#include "third_party/ppapi/c/ppp_instance.h"
#include "webkit/glue/plugins/pepper_audio.h"
@@ -213,8 +213,8 @@ const PPB_Testing_Dev testing_interface = {
const void* GetInterface(const char* name) {
if (strcmp(name, PPB_CORE_INTERFACE) == 0)
return &core_interface;
- if (strcmp(name, PPB_VAR_INTERFACE) == 0)
- return Var::GetInterface();
+ if (strcmp(name, PPB_VAR_DEPRECATED_INTERFACE) == 0)
+ return Var::GetDeprecatedInterface();
if (strcmp(name, PPB_INSTANCE_INTERFACE) == 0)
return PluginInstance::GetInterface();
if (strcmp(name, PPB_IMAGEDATA_INTERFACE) == 0)
diff --git a/webkit/glue/plugins/pepper_plugin_object.cc b/webkit/glue/plugins/pepper_plugin_object.cc
index c0a7cd6..b655f83 100644
--- a/webkit/glue/plugins/pepper_plugin_object.cc
+++ b/webkit/glue/plugins/pepper_plugin_object.cc
@@ -10,9 +10,9 @@
#include "base/string_util.h"
#include "third_party/npapi/bindings/npapi.h"
#include "third_party/npapi/bindings/npruntime.h"
+#include "third_party/ppapi/c/dev/ppb_var_deprecated.h"
+#include "third_party/ppapi/c/dev/ppp_class_deprecated.h"
#include "third_party/ppapi/c/pp_var.h"
-#include "third_party/ppapi/c/ppb_var.h"
-#include "third_party/ppapi/c/ppp_class.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
#include "webkit/glue/plugins/pepper_plugin_module.h"
#include "webkit/glue/plugins/pepper_string.h"
@@ -38,7 +38,7 @@ const char kInvalidPluginValue[] = "Error: Plugin returned invalid value.";
// an object.
bool PPVarToNPVariant(PP_Var var, NPVariant* result) {
switch (var.type) {
- case PP_VARTYPE_VOID:
+ case PP_VARTYPE_UNDEFINED:
VOID_TO_NPVARIANT(*result);
break;
case PP_VARTYPE_NULL:
@@ -139,7 +139,7 @@ class PPResultAndExceptionToNPResult {
NPVariant* np_result)
: object_var_(object_var),
np_result_(np_result),
- exception_(PP_MakeVoid()),
+ exception_(PP_MakeUndefined()),
success_(false),
checked_exception_(false) {
}
@@ -154,7 +154,7 @@ class PPResultAndExceptionToNPResult {
}
// Returns true if an exception has been set.
- bool has_exception() const { return exception_.type != PP_VARTYPE_VOID; }
+ bool has_exception() const { return exception_.type != PP_VARTYPE_UNDEFINED; }
// Returns a pointer to the exception. You would pass this to the PPAPI
// function as the exception parameter. If it is set to non-void, this object
@@ -267,11 +267,11 @@ class NPObjectAccessorWithIdentifier {
NPIdentifier identifier,
bool allow_integer_identifier)
: object_(PluginObject::FromNPObject(object)),
- identifier_(PP_MakeVoid()) {
+ identifier_(PP_MakeUndefined()) {
if (object_) {
identifier_ = Var::NPIdentifierToPPVar(object_->module(), identifier);
if (identifier_.type == PP_VARTYPE_INT32 && !allow_integer_identifier)
- identifier_.type = PP_VARTYPE_VOID; // Make the identifier invalid.
+ identifier_.type = PP_VARTYPE_UNDEFINED; // Mark it invalid.
}
}
@@ -281,7 +281,7 @@ class NPObjectAccessorWithIdentifier {
// Returns true if both the object and identifier are valid.
bool is_valid() const {
- return object_ && identifier_.type != PP_VARTYPE_VOID;
+ return object_ && identifier_.type != PP_VARTYPE_UNDEFINED;
}
PluginObject* object() { return object_; }
@@ -294,7 +294,7 @@ class NPObjectAccessorWithIdentifier {
DISALLOW_COPY_AND_ASSIGN(NPObjectAccessorWithIdentifier);
};
-// NPObject implementation in terms of PPP_Class -------------------------------
+// NPObject implementation in terms of PPP_Class_Deprecated --------------------
NPObject* WrapperClass_Allocate(NPP npp, NPClass* unused) {
return PluginObject::AllocateObjectWrapper();
@@ -349,7 +349,7 @@ bool WrapperClass_InvokeDefault(NPObject* np_object, const NPVariant* argv,
PPResultAndExceptionToNPResult result_converter(obj, result);
result_converter.SetResult(obj->ppp_class()->Call(
- obj->ppp_class_data(), PP_MakeVoid(), argc, args.array(),
+ obj->ppp_class_data(), PP_MakeUndefined(), argc, args.array(),
result_converter.exception()));
return result_converter.success();
}
@@ -518,7 +518,7 @@ struct PluginObject::NPObjectWrapper : public NPObject {
PluginObject::PluginObject(PluginModule* module,
NPObjectWrapper* object_wrapper,
- const PPP_Class* ppp_class,
+ const PPP_Class_Deprecated* ppp_class,
void* ppp_class_data)
: module_(module),
object_wrapper_(object_wrapper),
@@ -542,7 +542,7 @@ PluginObject::~PluginObject() {
}
PP_Var PluginObject::Create(PluginModule* module,
- const PPP_Class* ppp_class,
+ const PPP_Class_Deprecated* ppp_class,
void* ppp_class_data) {
// This will internally end up calling our AllocateObjectWrapper via the
// WrapperClass_Allocated function which will have created an object wrapper
@@ -568,7 +568,7 @@ NPObject* PluginObject::GetNPObject() const {
// static
bool PluginObject::IsInstanceOf(NPObject* np_object,
- const PPP_Class* ppp_class,
+ const PPP_Class_Deprecated* ppp_class,
void** ppp_class_data) {
// Validate that this object is implemented by our wrapper class before
// trying to get the PluginObject.
diff --git a/webkit/glue/plugins/pepper_plugin_object.h b/webkit/glue/plugins/pepper_plugin_object.h
index 7715a81..e31c1b1 100644
--- a/webkit/glue/plugins/pepper_plugin_object.h
+++ b/webkit/glue/plugins/pepper_plugin_object.h
@@ -10,7 +10,7 @@
#include "base/basictypes.h"
struct PP_Var;
-struct PPP_Class;
+struct PPP_Class_Deprecated;
typedef struct NPObject NPObject;
typedef struct _NPVariant NPVariant;
@@ -25,12 +25,12 @@ class PluginObject {
// Allocates a new PluginObject and returns it as a PP_Var with a
// refcount of 1.
static PP_Var Create(PluginModule* module,
- const PPP_Class* ppp_class,
+ const PPP_Class_Deprecated* ppp_class,
void* ppp_class_data);
PluginModule* module() const { return module_; }
- const PPP_Class* ppp_class() { return ppp_class_; }
+ const PPP_Class_Deprecated* ppp_class() { return ppp_class_; }
void* ppp_class_data() { return ppp_class_data_; };
NPObject* GetNPObject() const;
@@ -40,7 +40,7 @@ class PluginObject {
// returns true and places the class data into |*ppp_class_data| (which can
// optionally be NULL if no class data is desired).
static bool IsInstanceOf(NPObject* np_object,
- const PPP_Class* ppp_class,
+ const PPP_Class_Deprecated* ppp_class,
void** ppp_class_data);
// Converts the given NPObject to the corresponding ObjectVar.
@@ -65,7 +65,7 @@ class PluginObject {
// incremented on it, and this class will take ownership of that reference.
PluginObject(PluginModule* module,
NPObjectWrapper* object_wrapper,
- const PPP_Class* ppp_class,
+ const PPP_Class_Deprecated* ppp_class,
void* ppp_class_data);
PluginModule* module_;
@@ -78,7 +78,7 @@ class PluginObject {
// owns us.
NPObjectWrapper* object_wrapper_;
- const PPP_Class* ppp_class_;
+ const PPP_Class_Deprecated* ppp_class_;
void* ppp_class_data_;
DISALLOW_COPY_AND_ASSIGN(PluginObject);
diff --git a/webkit/glue/plugins/pepper_private.cc b/webkit/glue/plugins/pepper_private.cc
index 48469d8..cafd29e 100644
--- a/webkit/glue/plugins/pepper_private.cc
+++ b/webkit/glue/plugins/pepper_private.cc
@@ -77,7 +77,7 @@ static const ResourceImageInfo kResourceImageMap[] = {
PP_Var GetLocalizedString(PP_Module module_id, PP_ResourceString string_id) {
PluginModule* module = PluginModule::FromPPModule(module_id);
if (!module)
- return PP_MakeVoid();
+ return PP_MakeUndefined();
std::string rv;
if (string_id == PP_RESOURCESTRING_PDFGETPASSWORD)
diff --git a/webkit/glue/plugins/pepper_url_response_info.cc b/webkit/glue/plugins/pepper_url_response_info.cc
index 79042ba..8af3385 100644
--- a/webkit/glue/plugins/pepper_url_response_info.cc
+++ b/webkit/glue/plugins/pepper_url_response_info.cc
@@ -47,7 +47,7 @@ PP_Var GetProperty(PP_Resource response_id,
scoped_refptr<URLResponseInfo> response(
Resource::GetAs<URLResponseInfo>(response_id));
if (!response)
- return PP_MakeVoid();
+ return PP_MakeUndefined();
return response->GetProperty(property);
}
@@ -97,7 +97,7 @@ PP_Var URLResponseInfo::GetProperty(PP_URLResponseProperty_Dev property) {
return StringVar::StringToPPVar(module(), headers_);
default:
NOTIMPLEMENTED(); // TODO(darin): Implement me!
- return PP_MakeVoid();
+ return PP_MakeUndefined();
}
}
diff --git a/webkit/glue/plugins/pepper_var.cc b/webkit/glue/plugins/pepper_var.cc
index b4ba014..c83d443 100644
--- a/webkit/glue/plugins/pepper_var.cc
+++ b/webkit/glue/plugins/pepper_var.cc
@@ -7,8 +7,8 @@
#include "base/logging.h"
#include "base/scoped_ptr.h"
#include "base/string_util.h"
+#include "third_party/ppapi/c/dev/ppb_var_deprecated.h"
#include "third_party/ppapi/c/pp_var.h"
-#include "third_party/ppapi/c/ppb_var.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
#include "webkit/glue/plugins/pepper_plugin_module.h"
#include "webkit/glue/plugins/pepper_plugin_object.h"
@@ -43,7 +43,7 @@ const char kUnableToConstructException[] = "Error: Unable to construct";
// the PP_Var remains valid while the resultant NPVariant is in use.
bool PPVarToNPVariantNoCopy(PP_Var var, NPVariant* result) {
switch (var.type) {
- case PP_VARTYPE_VOID:
+ case PP_VARTYPE_UNDEFINED:
VOID_TO_NPVARIANT(*result);
break;
case PP_VARTYPE_NULL:
@@ -185,9 +185,9 @@ bool HasProperty(PP_Var var,
accessor.identifier());
}
-bool HasMethod(PP_Var var,
- PP_Var name,
- PP_Var* exception) {
+bool HasMethodDeprecated(PP_Var var,
+ PP_Var name,
+ PP_Var* exception) {
ObjectAccessorWithIdentifierTryCatch accessor(var, name, exception);
if (accessor.has_exception())
return false;
@@ -200,14 +200,14 @@ PP_Var GetProperty(PP_Var var,
PP_Var* exception) {
ObjectAccessorWithIdentifierTryCatch accessor(var, name, exception);
if (accessor.has_exception())
- return PP_MakeVoid();
+ return PP_MakeUndefined();
NPVariant result;
if (!WebBindings::getProperty(NULL, accessor.object()->np_object(),
accessor.identifier(), &result)) {
// An exception may have been raised.
accessor.SetException(kUnableToGetPropertyException);
- return PP_MakeVoid();
+ return PP_MakeUndefined();
}
PP_Var ret = Var::NPVariantToPPVar(accessor.object()->module(), &result);
@@ -215,7 +215,7 @@ PP_Var GetProperty(PP_Var var,
return ret;
}
-void GetAllPropertyNames(PP_Var var,
+void EnumerateProperties(PP_Var var,
uint32_t* property_count,
PP_Var** properties,
PP_Var* exception) {
@@ -246,10 +246,10 @@ void GetAllPropertyNames(PP_Var var,
free(identifiers);
}
-void SetProperty(PP_Var var,
- PP_Var name,
- PP_Var value,
- PP_Var* exception) {
+void SetPropertyDeprecated(PP_Var var,
+ PP_Var name,
+ PP_Var value,
+ PP_Var* exception) {
ObjectAccessorWithIdentifierTryCatch accessor(var, name, exception);
if (accessor.has_exception())
return;
@@ -264,7 +264,7 @@ void SetProperty(PP_Var var,
accessor.SetException(kUnableToSetPropertyException);
}
-void RemoveProperty(PP_Var var,
+void DeleteProperty(PP_Var var,
PP_Var name,
PP_Var* exception) {
ObjectAccessorWithIdentifierTryCatch accessor(var, name, exception);
@@ -276,28 +276,28 @@ void RemoveProperty(PP_Var var,
accessor.SetException(kUnableToRemovePropertyException);
}
-PP_Var Call(PP_Var var,
- PP_Var method_name,
- uint32_t argc,
- PP_Var* argv,
- PP_Var* exception) {
+PP_Var CallDeprecated(PP_Var var,
+ PP_Var method_name,
+ uint32_t argc,
+ PP_Var* argv,
+ PP_Var* exception) {
ObjectAccessorTryCatch accessor(var, exception);
if (accessor.has_exception())
- return PP_MakeVoid();
+ return PP_MakeUndefined();
NPIdentifier identifier;
- if (method_name.type == PP_VARTYPE_VOID) {
+ if (method_name.type == PP_VARTYPE_UNDEFINED) {
identifier = NULL;
} else if (method_name.type == PP_VARTYPE_STRING) {
// Specifically allow only string functions to be called.
identifier = Var::PPVarToNPIdentifier(method_name);
if (!identifier) {
accessor.SetException(kInvalidPropertyException);
- return PP_MakeVoid();
+ return PP_MakeUndefined();
}
} else {
accessor.SetException(kInvalidPropertyException);
- return PP_MakeVoid();
+ return PP_MakeUndefined();
}
scoped_array<NPVariant> args;
@@ -307,7 +307,7 @@ PP_Var Call(PP_Var var,
if (!PPVarToNPVariantNoCopy(argv[i], &args[i])) {
// This argument was invalid, throw an exception & give up.
accessor.SetException(kInvalidValueException);
- return PP_MakeVoid();
+ return PP_MakeUndefined();
}
}
}
@@ -326,7 +326,7 @@ PP_Var Call(PP_Var var,
if (!ok) {
// An exception may have been raised.
accessor.SetException(kUnableToCallMethodException);
- return PP_MakeVoid();
+ return PP_MakeUndefined();
}
PP_Var ret = Var::NPVariantToPPVar(accessor.module(), &result);
@@ -340,7 +340,7 @@ PP_Var Construct(PP_Var var,
PP_Var* exception) {
ObjectAccessorTryCatch accessor(var, exception);
if (accessor.has_exception())
- return PP_MakeVoid();
+ return PP_MakeUndefined();
scoped_array<NPVariant> args;
if (argc) {
@@ -349,7 +349,7 @@ PP_Var Construct(PP_Var var,
if (!PPVarToNPVariantNoCopy(argv[i], &args[i])) {
// This argument was invalid, throw an exception & give up.
accessor.SetException(kInvalidValueException);
- return PP_MakeVoid();
+ return PP_MakeUndefined();
}
}
}
@@ -359,7 +359,7 @@ PP_Var Construct(PP_Var var,
args.get(), argc, &result)) {
// An exception may have been raised.
accessor.SetException(kUnableToConstructException);
- return PP_MakeVoid();
+ return PP_MakeUndefined();
}
PP_Var ret = Var::NPVariantToPPVar(accessor.module(), &result);
@@ -367,9 +367,9 @@ PP_Var Construct(PP_Var var,
return ret;
}
-bool IsInstanceOf(PP_Var var,
- const PPP_Class* ppp_class,
- void** ppp_class_data) {
+bool IsInstanceOfDeprecated(PP_Var var,
+ const PPP_Class_Deprecated* ppp_class,
+ void** ppp_class_data) {
scoped_refptr<ObjectVar> object(ObjectVar::FromPPVar(var));
if (!object)
return false; // Not an object at all.
@@ -378,30 +378,30 @@ bool IsInstanceOf(PP_Var var,
ppp_class, ppp_class_data);
}
-PP_Var CreateObject(PP_Module module_id,
- const PPP_Class* ppp_class,
- void* ppp_class_data) {
+PP_Var CreateObjectDeprecated(PP_Module module_id,
+ const PPP_Class_Deprecated* ppp_class,
+ void* ppp_class_data) {
PluginModule* module = PluginModule::FromPPModule(module_id);
if (!module)
return PP_MakeNull();
return PluginObject::Create(module, ppp_class, ppp_class_data);
}
-const PPB_Var var_interface = {
+const PPB_Var_Deprecated var_deprecated_interface = {
&Var::PluginAddRefPPVar,
&Var::PluginReleasePPVar,
&VarFromUtf8,
&VarToUtf8,
&HasProperty,
- &HasMethod,
+ &HasMethodDeprecated,
&GetProperty,
- &GetAllPropertyNames,
- &SetProperty,
- &RemoveProperty,
- &Call,
+ &EnumerateProperties,
+ &SetPropertyDeprecated,
+ &DeleteProperty,
+ &CallDeprecated,
&Construct,
- &IsInstanceOf,
- &CreateObject
+ &IsInstanceOfDeprecated,
+ &CreateObjectDeprecated
};
} // namespace
@@ -418,7 +418,7 @@ Var::~Var() {
PP_Var Var::NPVariantToPPVar(PluginModule* module, const NPVariant* variant) {
switch (variant->type) {
case NPVariantType_Void:
- return PP_MakeVoid();
+ return PP_MakeUndefined();
case NPVariantType_Null:
return PP_MakeNull();
case NPVariantType_Bool:
@@ -436,7 +436,7 @@ PP_Var Var::NPVariantToPPVar(PluginModule* module, const NPVariant* variant) {
return ObjectVar::NPObjectToPPVar(module, NPVARIANT_TO_OBJECT(*variant));
}
NOTREACHED();
- return PP_MakeVoid();
+ return PP_MakeUndefined();
}
// static
@@ -488,8 +488,8 @@ void Var::PluginReleasePPVar(PP_Var var) {
}
// static
-const PPB_Var* Var::GetInterface() {
- return &var_interface;
+const PPB_Var_Deprecated* Var::GetDeprecatedInterface() {
+ return &var_deprecated_interface;
}
// StringVar -------------------------------------------------------------------
@@ -550,7 +550,7 @@ PP_Var ObjectVar::NPObjectToPPVar(PluginModule* module, NPObject* object) {
object_var = new ObjectVar(module, object);
if (!object_var)
- return PP_MakeVoid();
+ return PP_MakeUndefined();
// Convert to a PP_Var, GetReference will AddRef for us.
PP_Var result;
@@ -570,7 +570,7 @@ scoped_refptr<ObjectVar> ObjectVar::FromPPVar(PP_Var var) {
TryCatch::TryCatch(PluginModule* module, PP_Var* exception)
: module_(module),
- has_exception_(exception && exception->type != PP_VARTYPE_VOID),
+ has_exception_(exception && exception->type != PP_VARTYPE_UNDEFINED),
exception_(exception) {
WebBindings::pushExceptionHandler(&TryCatch::Catch, this);
}
diff --git a/webkit/glue/plugins/pepper_var.h b/webkit/glue/plugins/pepper_var.h
index b618029..0eb1807 100644
--- a/webkit/glue/plugins/pepper_var.h
+++ b/webkit/glue/plugins/pepper_var.h
@@ -10,7 +10,7 @@
#include "webkit/glue/plugins/pepper_resource.h"
struct PP_Var;
-struct PPB_Var;
+struct PPB_Var_Deprecated;
typedef struct NPObject NPObject;
typedef struct _NPVariant NPVariant;
typedef void* NPIdentifier;
@@ -79,8 +79,8 @@ class Var : public Resource {
static void PluginAddRefPPVar(PP_Var var);
static void PluginReleasePPVar(PP_Var var);
- // Returns the PPB_Var interface for the plugin to use.
- static const PPB_Var* GetInterface();
+ // Returns the PPB_Var_Deprecated interface for the plugin to use.
+ static const PPB_Var_Deprecated* GetDeprecatedInterface();
protected:
// This can only be constructed as a StringVar or an ObjectVar.