summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-13 03:48:24 +0000
committerdmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-13 03:48:24 +0000
commit7d0284e0c4638201635bccec014a6a8f08e58131 (patch)
treeba4e4f4a30e43b2e24773ad9b440f49d23958ac3
parent9d56dd31573039d45135ec516260bcc070cc284f (diff)
downloadchromium_src-7d0284e0c4638201635bccec014a6a8f08e58131.zip
chromium_src-7d0284e0c4638201635bccec014a6a8f08e58131.tar.gz
chromium_src-7d0284e0c4638201635bccec014a6a8f08e58131.tar.bz2
Reland http://codereview.chromium.org/7292033
Plus bonus change to a comment in pp_bool.h to try to get the bots to rebuild things properly ------ First pass at revving stable pepper interfaces to 1.0. Missing PPB_Core (pending removal of MemAlloc/MemFree) and new input event interfaces, in case we want to change them in the next ~week. BUG=84519 TEST=ppapi tests TBR=dmichael Review URL: http://codereview.chromium.org/7355014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92312 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ppapi/c/pp_bool.h4
-rw-r--r--ppapi/c/ppb_audio.h3
-rw-r--r--ppapi/c/ppb_audio_config.h3
-rw-r--r--ppapi/c/ppb_file_io.h3
-rw-r--r--ppapi/c/ppb_file_ref.h3
-rw-r--r--ppapi/c/ppb_file_system.h3
-rw-r--r--ppapi/c/ppb_graphics_2d.h3
-rw-r--r--ppapi/c/ppb_image_data.h3
-rw-r--r--ppapi/c/ppb_instance.h7
-rw-r--r--ppapi/c/ppb_messaging.h3
-rw-r--r--ppapi/c/ppb_url_loader.h3
-rw-r--r--ppapi/c/ppb_url_request_info.h3
-rw-r--r--ppapi/c/ppb_url_response_info.h3
-rw-r--r--ppapi/c/ppb_var.h3
-rw-r--r--ppapi/c/ppp_messaging.h4
-rw-r--r--ppapi/proxy/dispatcher.cc1
-rw-r--r--ppapi/proxy/ppb_instance_proxy.cc16
-rw-r--r--ppapi/proxy/ppb_instance_proxy.h1
-rw-r--r--ppapi/thunk/ppb_instance_thunk.cc6
-rw-r--r--ppapi/thunk/thunk.h6
-rw-r--r--webkit/plugins/ppapi/plugin_module.cc66
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.cc8
22 files changed, 112 insertions, 43 deletions
diff --git a/ppapi/c/pp_bool.h b/ppapi/c/pp_bool.h
index 961075d..acd7ce1 100644
--- a/ppapi/c/pp_bool.h
+++ b/ppapi/c/pp_bool.h
@@ -22,8 +22,8 @@
/**
* The <code>PP_Bool</code> enum is a boolean value for use in PPAPI C headers.
* The standard bool type is not available to pre-C99 compilers, and is not
- * guaranteed to be compatible between C and C++, whereas the PPAPI C
- * headers can be included from C or C++ code.
+ * guaranteed to be compatible between C and C++, whereas the PPAPI C headers
+ * can be included from C or C++ code.
*/
typedef enum {
PP_FALSE = 0,
diff --git a/ppapi/c/ppb_audio.h b/ppapi/c/ppb_audio.h
index 1ee4fbf..564a2b0 100644
--- a/ppapi/c/ppb_audio.h
+++ b/ppapi/c/ppb_audio.h
@@ -11,7 +11,8 @@
#include "ppapi/c/pp_stdint.h"
#define PPB_AUDIO_INTERFACE_0_6 "PPB_Audio;0.6"
-#define PPB_AUDIO_INTERFACE PPB_AUDIO_INTERFACE_0_6
+#define PPB_AUDIO_INTERFACE_1_0 "PPB_Audio;1.0"
+#define PPB_AUDIO_INTERFACE PPB_AUDIO_INTERFACE_1_0
/**
* @file
diff --git a/ppapi/c/ppb_audio_config.h b/ppapi/c/ppb_audio_config.h
index 033ac3c..71d486d 100644
--- a/ppapi/c/ppb_audio_config.h
+++ b/ppapi/c/ppb_audio_config.h
@@ -12,7 +12,8 @@
#include "ppapi/c/pp_stdint.h"
#define PPB_AUDIO_CONFIG_INTERFACE_0_5 "PPB_AudioConfig;0.5"
-#define PPB_AUDIO_CONFIG_INTERFACE PPB_AUDIO_CONFIG_INTERFACE_0_5
+#define PPB_AUDIO_CONFIG_INTERFACE_1_0 "PPB_AudioConfig;1.0"
+#define PPB_AUDIO_CONFIG_INTERFACE PPB_AUDIO_CONFIG_INTERFACE_1_0
/**
* @file
diff --git a/ppapi/c/ppb_file_io.h b/ppapi/c/ppb_file_io.h
index 364e14d..7f8b130 100644
--- a/ppapi/c/ppb_file_io.h
+++ b/ppapi/c/ppb_file_io.h
@@ -64,7 +64,8 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FileOpenFlags, 4);
*/
#define PPB_FILEIO_INTERFACE_0_5 "PPB_FileIO;0.5"
-#define PPB_FILEIO_INTERFACE PPB_FILEIO_INTERFACE_0_5
+#define PPB_FILEIO_INTERFACE_1_0 "PPB_FileIO;1.0"
+#define PPB_FILEIO_INTERFACE PPB_FILEIO_INTERFACE_1_0
/**
* @addtogroup Interfaces
diff --git a/ppapi/c/ppb_file_ref.h b/ppapi/c/ppb_file_ref.h
index 2702d35..e204c28 100644
--- a/ppapi/c/ppb_file_ref.h
+++ b/ppapi/c/ppb_file_ref.h
@@ -20,7 +20,8 @@
struct PP_CompletionCallback;
#define PPB_FILEREF_INTERFACE_0_9 "PPB_FileRef;0.9"
-#define PPB_FILEREF_INTERFACE PPB_FILEREF_INTERFACE_0_9
+#define PPB_FILEREF_INTERFACE_1_0 "PPB_FileRef;1.0"
+#define PPB_FILEREF_INTERFACE PPB_FILEREF_INTERFACE_1_0
/**
* @addtogroup Structs
diff --git a/ppapi/c/ppb_file_system.h b/ppapi/c/ppb_file_system.h
index 47e26a1..59b3d51 100644
--- a/ppapi/c/ppb_file_system.h
+++ b/ppapi/c/ppb_file_system.h
@@ -20,7 +20,8 @@
struct PP_CompletionCallback;
#define PPB_FILESYSTEM_INTERFACE_0_7 "PPB_FileSystem;0.7"
-#define PPB_FILESYSTEM_INTERFACE PPB_FILESYSTEM_INTERFACE_0_7
+#define PPB_FILESYSTEM_INTERFACE_1_0 "PPB_FileSystem;1.0"
+#define PPB_FILESYSTEM_INTERFACE PPB_FILESYSTEM_INTERFACE_1_0
/**
* @addtogroup Structs
diff --git a/ppapi/c/ppb_graphics_2d.h b/ppapi/c/ppb_graphics_2d.h
index 1fc33da..6020b050 100644
--- a/ppapi/c/ppb_graphics_2d.h
+++ b/ppapi/c/ppb_graphics_2d.h
@@ -17,7 +17,8 @@ struct PP_Rect;
struct PP_Size;
#define PPB_GRAPHICS_2D_INTERFACE_0_4 "PPB_Graphics2D;0.4"
-#define PPB_GRAPHICS_2D_INTERFACE PPB_GRAPHICS_2D_INTERFACE_0_4
+#define PPB_GRAPHICS_2D_INTERFACE_1_0 "PPB_Graphics2D;1.0"
+#define PPB_GRAPHICS_2D_INTERFACE PPB_GRAPHICS_2D_INTERFACE_1_0
/**
* @file
diff --git a/ppapi/c/ppb_image_data.h b/ppapi/c/ppb_image_data.h
index d7c8c82..c63148b 100644
--- a/ppapi/c/ppb_image_data.h
+++ b/ppapi/c/ppb_image_data.h
@@ -97,7 +97,8 @@ PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_ImageDataDesc, 16);
*/
#define PPB_IMAGEDATA_INTERFACE_0_3 "PPB_ImageData;0.3"
-#define PPB_IMAGEDATA_INTERFACE PPB_IMAGEDATA_INTERFACE_0_3
+#define PPB_IMAGEDATA_INTERFACE_1_0 "PPB_ImageData;1.0"
+#define PPB_IMAGEDATA_INTERFACE PPB_IMAGEDATA_INTERFACE_1_0
/**
* @addtogroup Interfaces
diff --git a/ppapi/c/ppb_instance.h b/ppapi/c/ppb_instance.h
index 1e49ee8..dbda74d6 100644
--- a/ppapi/c/ppb_instance.h
+++ b/ppapi/c/ppb_instance.h
@@ -12,8 +12,9 @@
#define PPB_INSTANCE_INTERFACE_0_4 "PPB_Instance;0.4"
#define PPB_INSTANCE_INTERFACE_0_5 "PPB_Instance;0.5"
+#define PPB_INSTANCE_INTERFACE_1_0 "PPB_Instance;1.0"
#ifdef PPAPI_INSTANCE_REMOVE_SCRIPTING
-#define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_0_5
+#define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_1_0
#else
#define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_0_4
#endif
@@ -37,7 +38,7 @@
#ifdef PPAPI_INSTANCE_REMOVE_SCRIPTING
struct PPB_Instance {
#else
-struct PPB_Instance_0_5 {
+struct PPB_Instance_1_0 {
#endif
/**
* BindGraphics() binds the given graphics as the current drawing surface.
@@ -100,7 +101,7 @@ struct PPB_Instance {
};
#ifdef PPAPI_INSTANCE_REMOVE_SCRIPTING
-typedef struct PPB_Instance PPB_Instance_0_5;
+typedef struct PPB_Instance PPB_Instance_1_0;
#else
typedef struct PPB_Instance PPB_Instance_0_4;
#endif
diff --git a/ppapi/c/ppb_messaging.h b/ppapi/c/ppb_messaging.h
index 5312323..b5b729b 100644
--- a/ppapi/c/ppb_messaging.h
+++ b/ppapi/c/ppb_messaging.h
@@ -9,7 +9,8 @@
#include "ppapi/c/pp_var.h"
#define PPB_MESSAGING_INTERFACE_0_1 "PPB_Messaging;0.1"
-#define PPB_MESSAGING_INTERFACE PPB_MESSAGING_INTERFACE_0_1
+#define PPB_MESSAGING_INTERFACE_1_0 "PPB_Messaging;1.0"
+#define PPB_MESSAGING_INTERFACE PPB_MESSAGING_INTERFACE_1_0
/**
* @file
diff --git a/ppapi/c/ppb_url_loader.h b/ppapi/c/ppb_url_loader.h
index 0ce27c0..3949f20 100644
--- a/ppapi/c/ppb_url_loader.h
+++ b/ppapi/c/ppb_url_loader.h
@@ -12,7 +12,8 @@
#include "ppapi/c/pp_stdint.h"
#define PPB_URLLOADER_INTERFACE_0_2 "PPB_URLLoader;0.2"
-#define PPB_URLLOADER_INTERFACE PPB_URLLOADER_INTERFACE_0_2
+#define PPB_URLLOADER_INTERFACE_1_0 "PPB_URLLoader;1.0"
+#define PPB_URLLOADER_INTERFACE PPB_URLLOADER_INTERFACE_1_0
/**
* @file
diff --git a/ppapi/c/ppb_url_request_info.h b/ppapi/c/ppb_url_request_info.h
index 820dd57..83f17c1 100644
--- a/ppapi/c/ppb_url_request_info.h
+++ b/ppapi/c/ppb_url_request_info.h
@@ -158,7 +158,8 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_URLRequestProperty, 4);
*/
#define PPB_URLREQUESTINFO_INTERFACE_0_2 "PPB_URLRequestInfo;0.2"
-#define PPB_URLREQUESTINFO_INTERFACE PPB_URLREQUESTINFO_INTERFACE_0_2
+#define PPB_URLREQUESTINFO_INTERFACE_1_0 "PPB_URLRequestInfo;1.0"
+#define PPB_URLREQUESTINFO_INTERFACE PPB_URLREQUESTINFO_INTERFACE_1_0
/**
*
diff --git a/ppapi/c/ppb_url_response_info.h b/ppapi/c/ppb_url_response_info.h
index 3894471..93051d4 100644
--- a/ppapi/c/ppb_url_response_info.h
+++ b/ppapi/c/ppb_url_response_info.h
@@ -87,7 +87,8 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_URLResponseProperty, 4);
*/
#define PPB_URLRESPONSEINFO_INTERFACE_0_1 "PPB_URLResponseInfo;0.1"
-#define PPB_URLRESPONSEINFO_INTERFACE PPB_URLRESPONSEINFO_INTERFACE_0_1
+#define PPB_URLRESPONSEINFO_INTERFACE_1_0 "PPB_URLResponseInfo;1.0"
+#define PPB_URLRESPONSEINFO_INTERFACE PPB_URLRESPONSEINFO_INTERFACE_1_0
/**
*
diff --git a/ppapi/c/ppb_var.h b/ppapi/c/ppb_var.h
index d22b5ce..ecd7514 100644
--- a/ppapi/c/ppb_var.h
+++ b/ppapi/c/ppb_var.h
@@ -12,7 +12,8 @@
#include "ppapi/c/pp_var.h"
#define PPB_VAR_INTERFACE_0_5 "PPB_Var;0.5"
-#define PPB_VAR_INTERFACE PPB_VAR_INTERFACE_0_5
+#define PPB_VAR_INTERFACE_1_0 "PPB_Var;1.0"
+#define PPB_VAR_INTERFACE PPB_VAR_INTERFACE_1_0
/**
* @file
diff --git a/ppapi/c/ppp_messaging.h b/ppapi/c/ppp_messaging.h
index 29a7976..c36ed96 100644
--- a/ppapi/c/ppp_messaging.h
+++ b/ppapi/c/ppp_messaging.h
@@ -9,7 +9,9 @@
struct PP_Var;
-#define PPP_MESSAGING_INTERFACE "PPP_Messaging;0.1"
+#define PPP_MESSAGING_INTERFACE_0_1 "PPP_Messaging;0.1"
+#define PPP_MESSAGING_INTERFACE_1_0 "PPP_Messaging;1.0"
+#define PPP_MESSAGING_INTERFACE PPP_MESSAGING_INTERFACE_1_0
/**
* @file
diff --git a/ppapi/proxy/dispatcher.cc b/ppapi/proxy/dispatcher.cc
index ad32beb..e9b57c3 100644
--- a/ppapi/proxy/dispatcher.cc
+++ b/ppapi/proxy/dispatcher.cc
@@ -141,6 +141,7 @@ InterfaceList::InterfaceList() {
AddPPB(PPB_InputEvent_Proxy::GetInfo());
AddPPB(PPB_Instance_Proxy::GetInfo0_4());
AddPPB(PPB_Instance_Proxy::GetInfo0_5());
+ AddPPB(PPB_Instance_Proxy::GetInfo1_0());
AddPPB(PPB_Instance_Proxy::GetInfoFullscreen());
AddPPB(PPB_Instance_Proxy::GetInfoMessaging());
AddPPB(PPB_Instance_Proxy::GetInfoPrivate());
diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc
index 7c3827f..5a6158a 100644
--- a/ppapi/proxy/ppb_instance_proxy.cc
+++ b/ppapi/proxy/ppb_instance_proxy.cc
@@ -51,7 +51,7 @@ const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfo0_4() {
static const Info info = {
ppapi::thunk::GetPPB_Instance_0_4_Thunk(),
PPB_INSTANCE_INTERFACE_0_4,
- INTERFACE_ID_NONE, // 0_5 is the canonical one.
+ INTERFACE_ID_NONE, // 1_0 is the canonical one.
false,
&CreateInstanceProxy,
};
@@ -61,8 +61,20 @@ const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfo0_4() {
// static
const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfo0_5() {
static const Info info = {
- ppapi::thunk::GetPPB_Instance_0_5_Thunk(),
+ ppapi::thunk::GetPPB_Instance_1_0_Thunk(),
PPB_INSTANCE_INTERFACE_0_5,
+ INTERFACE_ID_NONE, // 1_0 is the canonical one.
+ false,
+ &CreateInstanceProxy,
+ };
+ return &info;
+}
+
+// static
+const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfo1_0() {
+ static const Info info = {
+ ppapi::thunk::GetPPB_Instance_1_0_Thunk(),
+ PPB_INSTANCE_INTERFACE_1_0,
INTERFACE_ID_PPB_INSTANCE,
false,
&CreateInstanceProxy,
diff --git a/ppapi/proxy/ppb_instance_proxy.h b/ppapi/proxy/ppb_instance_proxy.h
index d4de0a4..9d045fb 100644
--- a/ppapi/proxy/ppb_instance_proxy.h
+++ b/ppapi/proxy/ppb_instance_proxy.h
@@ -31,6 +31,7 @@ class PPB_Instance_Proxy : public InterfaceProxy,
static const Info* GetInfo0_4();
static const Info* GetInfo0_5();
+ static const Info* GetInfo1_0();
static const Info* GetInfoMessaging();
static const Info* GetInfoPrivate();
static const Info* GetInfoFullscreen();
diff --git a/ppapi/thunk/ppb_instance_thunk.cc b/ppapi/thunk/ppb_instance_thunk.cc
index 025e3e0..3d7ef60 100644
--- a/ppapi/thunk/ppb_instance_thunk.cc
+++ b/ppapi/thunk/ppb_instance_thunk.cc
@@ -49,7 +49,7 @@ PP_Var ExecuteScript(PP_Instance instance,
return enter.functions()->ExecuteScript(instance, script, exception);
}
-const PPB_Instance_0_5 g_ppb_instance_0_5_thunk = {
+const PPB_Instance_1_0 g_ppb_instance_1_0_thunk = {
&BindGraphics,
&IsFullFrame
};
@@ -73,8 +73,8 @@ const PPB_Instance_Private g_ppb_instance_private_thunk = {
const PPB_Instance_0_4* GetPPB_Instance_0_4_Thunk() {
return &g_ppb_instance_0_4_thunk;
}
-const PPB_Instance_0_5* GetPPB_Instance_0_5_Thunk() {
- return &g_ppb_instance_0_5_thunk;
+const PPB_Instance_1_0* GetPPB_Instance_1_0_Thunk() {
+ return &g_ppb_instance_1_0_thunk;
}
const PPB_Instance_Private* GetPPB_Instance_Private_Thunk() {
return &g_ppb_instance_private_thunk;
diff --git a/ppapi/thunk/thunk.h b/ppapi/thunk/thunk.h
index b02b920..e03a8e1 100644
--- a/ppapi/thunk/thunk.h
+++ b/ppapi/thunk/thunk.h
@@ -54,9 +54,9 @@ struct PPB_Zoom_Dev;
#ifdef PPAPI_INSTANCE_REMOVE_SCRIPTING
struct PPB_Instance_0_4;
-typedef PPB_Instance PPB_Instance_0_5;
+typedef PPB_Instance PPB_Instance_1_0;
#else
-struct PPB_Instance_0_5;
+struct PPB_Instance_1_0;
typedef PPB_Instance PPB_Instance_0_4;
#endif
@@ -93,7 +93,7 @@ const PPB_InputEvent* GetPPB_InputEvent_Thunk();
const PPB_ImageData* GetPPB_ImageData_Thunk();
const PPB_ImageDataTrusted* GetPPB_ImageDataTrusted_Thunk();
const PPB_Instance_0_4* GetPPB_Instance_0_4_Thunk();
-const PPB_Instance_0_5* GetPPB_Instance_0_5_Thunk();
+const PPB_Instance_1_0* GetPPB_Instance_1_0_Thunk();
const PPB_Instance_Private* GetPPB_Instance_Private_Thunk();
const PPB_KeyboardInputEvent* GetPPB_KeyboardInputEvent_Thunk();
const PPB_LayerCompositor_Dev* GetPPB_LayerCompositor_Thunk();
diff --git a/webkit/plugins/ppapi/plugin_module.cc b/webkit/plugins/ppapi/plugin_module.cc
index 65d702d..8a01f63 100644
--- a/webkit/plugins/ppapi/plugin_module.cc
+++ b/webkit/plugins/ppapi/plugin_module.cc
@@ -232,9 +232,9 @@ const void* GetInterface(const char* name) {
// Please keep alphabetized by interface macro name with "special" stuff at
// the bottom.
- if (strcmp(name, PPB_AUDIO_CONFIG_INTERFACE) == 0)
+ if (strcmp(name, PPB_AUDIO_CONFIG_INTERFACE_1_0) == 0)
return ::ppapi::thunk::GetPPB_AudioConfig_Thunk();
- if (strcmp(name, PPB_AUDIO_INTERFACE) == 0)
+ if (strcmp(name, PPB_AUDIO_INTERFACE_1_0) == 0)
return ::ppapi::thunk::GetPPB_Audio_Thunk();
if (strcmp(name, PPB_AUDIO_TRUSTED_INTERFACE) == 0)
return ::ppapi::thunk::GetPPB_AudioTrusted_Thunk();
@@ -258,13 +258,13 @@ const void* GetInterface(const char* name) {
return ::ppapi::thunk::GetPPB_DirectoryReader_Thunk();
if (strcmp(name, PPB_FILECHOOSER_DEV_INTERFACE) == 0)
return ::ppapi::thunk::GetPPB_FileChooser_Thunk();
- if (strcmp(name, PPB_FILEIO_INTERFACE) == 0)
+ if (strcmp(name, PPB_FILEIO_INTERFACE_1_0) == 0)
return ::ppapi::thunk::GetPPB_FileIO_Thunk();
if (strcmp(name, PPB_FILEIOTRUSTED_INTERFACE) == 0)
return ::ppapi::thunk::GetPPB_FileIOTrusted_Thunk();
- if (strcmp(name, PPB_FILEREF_INTERFACE) == 0)
+ if (strcmp(name, PPB_FILEREF_INTERFACE_1_0) == 0)
return ::ppapi::thunk::GetPPB_FileRef_Thunk();
- if (strcmp(name, PPB_FILESYSTEM_INTERFACE) == 0)
+ if (strcmp(name, PPB_FILESYSTEM_INTERFACE_1_0) == 0)
return ::ppapi::thunk::GetPPB_FileSystem_Thunk();
if (strcmp(name, PPB_FIND_DEV_INTERFACE) == 0)
return ::ppapi::thunk::GetPPB_Find_Thunk();
@@ -284,25 +284,23 @@ const void* GetInterface(const char* name) {
return ::ppapi::thunk::GetPPB_Font_Thunk();
if (strcmp(name, PPB_FULLSCREEN_DEV_INTERFACE) == 0)
return ::ppapi::thunk::GetPPB_Fullscreen_Thunk();
- if (strcmp(name, PPB_GRAPHICS_2D_INTERFACE) == 0)
+ if (strcmp(name, PPB_GRAPHICS_2D_INTERFACE_1_0) == 0)
return ::ppapi::thunk::GetPPB_Graphics2D_Thunk();
- if (strcmp(name, PPB_IMAGEDATA_INTERFACE) == 0)
+ if (strcmp(name, PPB_IMAGEDATA_INTERFACE_1_0) == 0)
return ::ppapi::thunk::GetPPB_ImageData_Thunk();
if (strcmp(name, PPB_IMAGEDATA_TRUSTED_INTERFACE) == 0)
return ::ppapi::thunk::GetPPB_ImageDataTrusted_Thunk();
if (strcmp(name, PPB_INPUT_EVENT_INTERFACE) == 0)
return ::ppapi::thunk::GetPPB_InputEvent_Thunk();
- if (strcmp(name, PPB_INSTANCE_INTERFACE_0_4) == 0)
- return ::ppapi::thunk::GetPPB_Instance_0_4_Thunk();
- if (strcmp(name, PPB_INSTANCE_INTERFACE_0_5) == 0)
- return ::ppapi::thunk::GetPPB_Instance_0_5_Thunk();
+ if (strcmp(name, PPB_INSTANCE_INTERFACE_1_0) == 0)
+ return ::ppapi::thunk::GetPPB_Instance_1_0_Thunk();
if (strcmp(name, PPB_INSTANCE_PRIVATE_INTERFACE) == 0)
return ::ppapi::thunk::GetPPB_Instance_Private_Thunk();
if (strcmp(name, PPB_KEYBOARD_INPUT_EVENT_INTERFACE) == 0)
return ::ppapi::thunk::GetPPB_KeyboardInputEvent_Thunk();
if (strcmp(name, PPB_MEMORY_DEV_INTERFACE) == 0)
return PPB_Memory_Impl::GetInterface();
- if (strcmp(name, PPB_MESSAGING_INTERFACE) == 0)
+ if (strcmp(name, PPB_MESSAGING_INTERFACE_1_0) == 0)
return ::ppapi::thunk::GetPPB_Messaging_Thunk();
if (strcmp(name, PPB_MOUSE_INPUT_EVENT_INTERFACE) == 0)
return ::ppapi::thunk::GetPPB_MouseInputEvent_Thunk();
@@ -314,19 +312,19 @@ const void* GetInterface(const char* name) {
return PPB_Scrollbar_Impl::Get0_3Interface();
if (strcmp(name, PPB_UMA_PRIVATE_INTERFACE) == 0)
return PPB_UMA_Private_Impl::GetInterface();
- if (strcmp(name, PPB_URLLOADER_INTERFACE) == 0)
+ if (strcmp(name, PPB_URLLOADER_INTERFACE_1_0) == 0)
return ::ppapi::thunk::GetPPB_URLLoader_Thunk();
if (strcmp(name, PPB_URLLOADERTRUSTED_INTERFACE) == 0)
return ::ppapi::thunk::GetPPB_URLLoaderTrusted_Thunk();
- if (strcmp(name, PPB_URLREQUESTINFO_INTERFACE) == 0)
+ if (strcmp(name, PPB_URLREQUESTINFO_INTERFACE_1_0) == 0)
return ::ppapi::thunk::GetPPB_URLRequestInfo_Thunk();
- if (strcmp(name, PPB_URLRESPONSEINFO_INTERFACE) == 0)
+ if (strcmp(name, PPB_URLRESPONSEINFO_INTERFACE_1_0) == 0)
return ::ppapi::thunk::GetPPB_URLResponseInfo_Thunk();
if (strcmp(name, PPB_URLUTIL_DEV_INTERFACE) == 0)
return PPB_URLUtil_Impl::GetInterface();
if (strcmp(name, PPB_VAR_DEPRECATED_INTERFACE) == 0)
return Var::GetDeprecatedInterface();
- if (strcmp(name, PPB_VAR_INTERFACE) == 0)
+ if (strcmp(name, PPB_VAR_INTERFACE_1_0) == 0)
return Var::GetInterface();
if (strcmp(name, PPB_VIDEODECODER_DEV_INTERFACE) == 0)
return ::ppapi::thunk::GetPPB_VideoDecoder_Thunk();
@@ -369,6 +367,42 @@ const void* GetInterface(const char* name) {
return ::ppapi::thunk::GetPPB_Transport_Thunk();
#endif
+ // Support pre-1.0 version strings of stable interfaces until the changes
+ // have rippled through the system (especially NaCl tree).
+ // TODO(dmichael): Remove this.
+ if (strcmp(name, PPB_AUDIO_CONFIG_INTERFACE_0_5) == 0)
+ return ::ppapi::thunk::GetPPB_AudioConfig_Thunk();
+ if (strcmp(name, PPB_AUDIO_INTERFACE_0_6) == 0)
+ return ::ppapi::thunk::GetPPB_Audio_Thunk();
+ if (strcmp(name, PPB_FILEIO_INTERFACE_0_5) == 0)
+ return ::ppapi::thunk::GetPPB_FileIO_Thunk();
+ if (strcmp(name, PPB_FILEREF_INTERFACE_0_9) == 0)
+ return ::ppapi::thunk::GetPPB_FileRef_Thunk();
+ if (strcmp(name, PPB_FILESYSTEM_INTERFACE_0_7) == 0)
+ return ::ppapi::thunk::GetPPB_FileSystem_Thunk();
+ if (strcmp(name, PPB_GRAPHICS_2D_INTERFACE_0_4) == 0)
+ return ::ppapi::thunk::GetPPB_Graphics2D_Thunk();
+ if (strcmp(name, PPB_IMAGEDATA_INTERFACE_0_3) == 0)
+ return ::ppapi::thunk::GetPPB_ImageData_Thunk();
+ if (strcmp(name, PPB_INSTANCE_INTERFACE_0_5) == 0)
+ return ::ppapi::thunk::GetPPB_Instance_1_0_Thunk();
+ if (strcmp(name, PPB_MESSAGING_INTERFACE_0_1) == 0)
+ return ::ppapi::thunk::GetPPB_Messaging_Thunk();
+ if (strcmp(name, PPB_URLLOADER_INTERFACE_0_2) == 0)
+ return ::ppapi::thunk::GetPPB_URLLoader_Thunk();
+ if (strcmp(name, PPB_URLREQUESTINFO_INTERFACE_0_2) == 0)
+ return ::ppapi::thunk::GetPPB_URLRequestInfo_Thunk();
+ if (strcmp(name, PPB_URLRESPONSEINFO_INTERFACE_0_1) == 0)
+ return ::ppapi::thunk::GetPPB_URLResponseInfo_Thunk();
+ if (strcmp(name, PPB_VAR_INTERFACE_0_5) == 0)
+ return Var::GetInterface();
+
+ // Support the 0.4 version of PPB_Instance that includes scripting, until it
+ // is no longer being used.
+ // TODO(dmichael): Remove this.
+ if (strcmp(name, PPB_INSTANCE_INTERFACE_0_4) == 0)
+ return ::ppapi::thunk::GetPPB_Instance_0_4_Thunk();
+
// Support the dev interfaces for file io, fileref and file system
// until relevant tests and examples are migrated over to non-dev interfaces
// in order to prevent breaking the tests and examples.
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 6ed2ea8..c7df634 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -700,7 +700,13 @@ bool PluginInstance::LoadMessagingInterface() {
checked_for_plugin_messaging_interface_ = true;
plugin_messaging_interface_ =
static_cast<const PPP_Messaging*>(module_->GetPluginInterface(
- PPP_MESSAGING_INTERFACE));
+ PPP_MESSAGING_INTERFACE_1_0));
+ // TODO(dmichael): Remove support for 0.1.
+ if (!plugin_messaging_interface_) {
+ plugin_messaging_interface_ =
+ static_cast<const PPP_Messaging*>(module_->GetPluginInterface(
+ PPP_MESSAGING_INTERFACE_0_1));
+ }
}
return !!plugin_messaging_interface_;