Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Unified Diff: webkit/glue/plugins/pepper_image_data.cc

Issue 4310002: Make PPAPI headers compile with C compilers (gcc on Linux & Mac and MSVS on W... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/plugins/pepper_graphics_3d.cc ('k') | webkit/glue/plugins/pepper_plugin_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/pepper_image_data.cc
===================================================================
--- webkit/glue/plugins/pepper_image_data.cc (revision 65116)
+++ webkit/glue/plugins/pepper_image_data.cc (working copy)
@@ -16,6 +16,7 @@
#include "ppapi/c/ppb_image_data.h"
#include "ppapi/c/trusted/ppb_image_data_trusted.h"
#include "third_party/skia/include/core/SkColorPriv.h"
+#include "webkit/glue/plugins/pepper_common.h"
#include "webkit/glue/plugins/pepper_plugin_instance.h"
#include "webkit/glue/plugins/pepper_plugin_module.h"
@@ -27,38 +28,42 @@
return ImageData::GetNativeImageDataFormat();
}
-bool IsImageDataFormatSupported(PP_ImageDataFormat format) {
- return ImageData::IsImageDataFormatSupported(format);
+PP_Bool IsImageDataFormatSupported(PP_ImageDataFormat format) {
+ return BoolToPPBool(ImageData::IsImageDataFormatSupported(format));
}
PP_Resource Create(PP_Module module_id,
PP_ImageDataFormat format,
const PP_Size* size,
- bool init_to_zero) {
+ PP_Bool init_to_zero) {
PluginModule* module = ResourceTracker::Get()->GetModule(module_id);
if (!module)
return 0;
scoped_refptr<ImageData> data(new ImageData(module));
- if (!data->Init(format, size->width, size->height, init_to_zero))
+ if (!data->Init(format,
+ size->width,
+ size->height,
+ PPBoolToBool(init_to_zero))) {
return 0;
+ }
return data->GetReference();
}
-bool IsImageData(PP_Resource resource) {
- return !!Resource::GetAs<ImageData>(resource);
+PP_Bool IsImageData(PP_Resource resource) {
+ return BoolToPPBool(!!Resource::GetAs<ImageData>(resource));
}
-bool Describe(PP_Resource resource, PP_ImageDataDesc* desc) {
+PP_Bool Describe(PP_Resource resource, PP_ImageDataDesc* desc) {
// Give predictable values on failure.
memset(desc, 0, sizeof(PP_ImageDataDesc));
scoped_refptr<ImageData> image_data(Resource::GetAs<ImageData>(resource));
if (!image_data)
- return false;
+ return PP_FALSE;
image_data->Describe(desc);
- return true;
+ return PP_TRUE;
}
void* Map(PP_Resource resource) {
« no previous file with comments | « webkit/glue/plugins/pepper_graphics_3d.cc ('k') | webkit/glue/plugins/pepper_plugin_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698