summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/pepper_plugin_module.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-30 01:31:07 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-30 01:31:07 +0000
commit81870ae8c94f96486435a11a490fa53e4dafb096 (patch)
treee4ce9353aec4ae676710e139381169b6a4965014 /webkit/glue/plugins/pepper_plugin_module.cc
parentf58bddab858b88bddd77d7ef8d01a4a2eea55364 (diff)
downloadchromium_src-81870ae8c94f96486435a11a490fa53e4dafb096.zip
chromium_src-81870ae8c94f96486435a11a490fa53e4dafb096.tar.gz
chromium_src-81870ae8c94f96486435a11a490fa53e4dafb096.tar.bz2
Pull new PPAPI, rename non-P0 interfaces to Dev, rename DeviceContext2D to Graphics2D.
TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3255003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57825 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins/pepper_plugin_module.cc')
-rw-r--r--webkit/glue/plugins/pepper_plugin_module.cc88
1 files changed, 45 insertions, 43 deletions
diff --git a/webkit/glue/plugins/pepper_plugin_module.cc b/webkit/glue/plugins/pepper_plugin_module.cc
index 39df9cf..a0785cc 100644
--- a/webkit/glue/plugins/pepper_plugin_module.cc
+++ b/webkit/glue/plugins/pepper_plugin_module.cc
@@ -12,42 +12,44 @@
#include "base/logging.h"
#include "base/scoped_ptr.h"
#include "base/time.h"
+#include "third_party/ppapi/c/dev/ppb_buffer_dev.h"
#include "third_party/ppapi/c/dev/ppb_char_set_dev.h"
+#include "third_party/ppapi/c/dev/ppb_directory_reader_dev.h"
+#include "third_party/ppapi/c/dev/ppb_file_io_dev.h"
+#include "third_party/ppapi/c/dev/ppb_file_io_trusted_dev.h"
+#include "third_party/ppapi/c/dev/ppb_file_system_dev.h"
+#include "third_party/ppapi/c/dev/ppb_find_dev.h"
+#include "third_party/ppapi/c/dev/ppb_font_dev.h"
+#include "third_party/ppapi/c/dev/ppb_graphics_3d_dev.h"
+#include "third_party/ppapi/c/dev/ppb_opengles_dev.h"
+#include "third_party/ppapi/c/dev/ppb_scrollbar_dev.h"
+#include "third_party/ppapi/c/dev/ppb_testing_dev.h"
+#include "third_party/ppapi/c/dev/ppb_url_loader_dev.h"
+#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_video_decoder_dev.h"
-#include "third_party/ppapi/c/ppb_buffer.h"
+#include "third_party/ppapi/c/dev/ppb_widget_dev.h"
+#include "third_party/ppapi/c/pp_module.h"
+#include "third_party/ppapi/c/pp_resource.h"
+#include "third_party/ppapi/c/pp_var.h"
#include "third_party/ppapi/c/ppb_core.h"
-#include "third_party/ppapi/c/ppb_device_context_2d.h"
-#include "third_party/ppapi/c/ppb_file_io.h"
-#include "third_party/ppapi/c/ppb_file_io_trusted.h"
-#include "third_party/ppapi/c/ppb_file_system.h"
-#include "third_party/ppapi/c/ppb_find.h"
-#include "third_party/ppapi/c/ppb_font.h"
+#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_opengles.h"
-#include "third_party/ppapi/c/ppb_scrollbar.h"
-#include "third_party/ppapi/c/ppb_testing.h"
-#include "third_party/ppapi/c/ppb_url_loader.h"
-#include "third_party/ppapi/c/ppb_url_request_info.h"
-#include "third_party/ppapi/c/ppb_url_response_info.h"
-#include "third_party/ppapi/c/ppb_url_util.h"
#include "third_party/ppapi/c/ppb_var.h"
-#include "third_party/ppapi/c/ppb_widget.h"
#include "third_party/ppapi/c/ppp.h"
#include "third_party/ppapi/c/ppp_instance.h"
-#include "third_party/ppapi/c/pp_module.h"
-#include "third_party/ppapi/c/pp_resource.h"
-#include "third_party/ppapi/c/pp_var.h"
#include "webkit/glue/plugins/pepper_audio.h"
#include "webkit/glue/plugins/pepper_buffer.h"
#include "webkit/glue/plugins/pepper_char_set.h"
-#include "webkit/glue/plugins/pepper_device_context_2d.h"
#include "webkit/glue/plugins/pepper_directory_reader.h"
#include "webkit/glue/plugins/pepper_file_chooser.h"
#include "webkit/glue/plugins/pepper_file_io.h"
#include "webkit/glue/plugins/pepper_file_ref.h"
#include "webkit/glue/plugins/pepper_file_system.h"
#include "webkit/glue/plugins/pepper_font.h"
+#include "webkit/glue/plugins/pepper_graphics_2d.h"
#include "webkit/glue/plugins/pepper_image_data.h"
#include "webkit/glue/plugins/pepper_plugin_instance.h"
#include "webkit/glue/plugins/pepper_private.h"
@@ -139,8 +141,8 @@ const PPB_Core core_interface = {
bool ReadImageData(PP_Resource device_context_2d,
PP_Resource image,
const PP_Point* top_left) {
- scoped_refptr<DeviceContext2D> context(
- Resource::GetAs<DeviceContext2D>(device_context_2d));
+ scoped_refptr<Graphics2D> context(
+ Resource::GetAs<Graphics2D>(device_context_2d));
if (!context.get())
return false;
return context->ReadImageData(image, top_left);
@@ -157,7 +159,7 @@ void QuitMessageLoop() {
MessageLoop::current()->Quit();
}
-const PPB_Testing testing_interface = {
+const PPB_Testing_Dev testing_interface = {
&ReadImageData,
&RunMessageLoop,
&QuitMessageLoop,
@@ -180,45 +182,45 @@ const void* GetInterface(const char* name) {
return Audio::GetInterface();
if (strcmp(name, PPB_AUDIO_TRUSTED_DEV_INTERFACE) == 0)
return Audio::GetTrustedInterface();
- if (strcmp(name, PPB_DEVICECONTEXT2D_INTERFACE) == 0)
- return DeviceContext2D::GetInterface();
+ if (strcmp(name, PPB_GRAPHICS_2D_INTERFACE) == 0)
+ return Graphics2D::GetInterface();
#ifdef ENABLE_GPU
- if (strcmp(name, PPB_GRAPHICS_3D_INTERFACE) == 0)
+ if (strcmp(name, PPB_GRAPHICS_3D_DEV_INTERFACE) == 0)
return Graphics3D::GetInterface();
- if (strcmp(name, PPB_OPENGLES_INTERFACE) == 0)
+ if (strcmp(name, PPB_OPENGLES_DEV_INTERFACE) == 0)
return Graphics3D::GetOpenGLESInterface();
#endif // ENABLE_GPU
- if (strcmp(name, PPB_URLLOADER_INTERFACE) == 0)
+ if (strcmp(name, PPB_URLLOADER_DEV_INTERFACE) == 0)
return URLLoader::GetInterface();
- if (strcmp(name, PPB_URLREQUESTINFO_INTERFACE) == 0)
+ if (strcmp(name, PPB_URLREQUESTINFO_DEV_INTERFACE) == 0)
return URLRequestInfo::GetInterface();
- if (strcmp(name, PPB_URLRESPONSEINFO_INTERFACE) == 0)
+ if (strcmp(name, PPB_URLRESPONSEINFO_DEV_INTERFACE) == 0)
return URLResponseInfo::GetInterface();
- if (strcmp(name, PPB_BUFFER_INTERFACE) == 0)
+ if (strcmp(name, PPB_BUFFER_DEV_INTERFACE) == 0)
return Buffer::GetInterface();
- if (strcmp(name, PPB_FILEREF_INTERFACE) == 0)
+ if (strcmp(name, PPB_FILEREF_DEV_INTERFACE) == 0)
return FileRef::GetInterface();
- if (strcmp(name, PPB_FILEIO_INTERFACE) == 0)
+ if (strcmp(name, PPB_FILEIO_DEV_INTERFACE) == 0)
return FileIO::GetInterface();
- if (strcmp(name, PPB_FILEIOTRUSTED_INTERFACE) == 0)
+ if (strcmp(name, PPB_FILEIOTRUSTED_DEV_INTERFACE) == 0)
return FileIO::GetTrustedInterface();
- if (strcmp(name, PPB_FILESYSTEM_INTERFACE) == 0)
+ if (strcmp(name, PPB_FILESYSTEM_DEV_INTERFACE) == 0)
return FileSystem::GetInterface();
- if (strcmp(name, PPB_DIRECTORYREADER_INTERFACE) == 0)
+ if (strcmp(name, PPB_DIRECTORYREADER_DEV_INTERFACE) == 0)
return DirectoryReader::GetInterface();
- if (strcmp(name, PPB_WIDGET_INTERFACE) == 0)
+ if (strcmp(name, PPB_WIDGET_DEV_INTERFACE) == 0)
return Widget::GetInterface();
- if (strcmp(name, PPB_SCROLLBAR_INTERFACE) == 0)
+ if (strcmp(name, PPB_SCROLLBAR_DEV_INTERFACE) == 0)
return Scrollbar::GetInterface();
- if (strcmp(name, PPB_FONT_INTERFACE) == 0)
+ if (strcmp(name, PPB_FONT_DEV_INTERFACE) == 0)
return Font::GetInterface();
- if (strcmp(name, PPB_FIND_INTERFACE) == 0)
+ if (strcmp(name, PPB_FIND_DEV_INTERFACE) == 0)
return PluginInstance::GetFindInterface();
- if (strcmp(name, PPB_URLUTIL_INTERFACE) == 0)
- return GetUrlUtilInterface();
+ if (strcmp(name, PPB_URLUTIL_DEV_INTERFACE) == 0)
+ return UrlUtil::GetInterface();
if (strcmp(name, PPB_PRIVATE_INTERFACE) == 0)
return Private::GetInterface();
- if (strcmp(name, PPB_FILECHOOSER_INTERFACE) == 0)
+ if (strcmp(name, PPB_FILECHOOSER_DEV_INTERFACE) == 0)
return FileChooser::GetInterface();
if (strcmp(name, PPB_VIDEODECODER_DEV_INTERFACE) == 0)
return VideoDecoder::GetInterface();
@@ -228,7 +230,7 @@ const void* GetInterface(const char* name) {
// Only support the testing interface when the command line switch is
// specified. This allows us to prevent people from (ab)using this interface
// in production code.
- if (strcmp(name, PPB_TESTING_INTERFACE) == 0) {
+ if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0) {
if (CommandLine::ForCurrentProcess()->HasSwitch("enable-pepper-testing"))
return &testing_interface;
}