summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/pepper_cursor_control.cc
diff options
context:
space:
mode:
authordmichael@google.com <dmichael@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-05 14:45:44 +0000
committerdmichael@google.com <dmichael@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-05 14:45:44 +0000
commit6f2e3919c4709404d8d7b6742f9cd9989b799c98 (patch)
tree55a933f7e2988625f0f3ded5a562203c7e3921c9 /webkit/glue/plugins/pepper_cursor_control.cc
parent79ba2d8a26fe6c9b343c57fef57896a90baa3878 (diff)
downloadchromium_src-6f2e3919c4709404d8d7b6742f9cd9989b799c98.zip
chromium_src-6f2e3919c4709404d8d7b6742f9cd9989b799c98.tar.gz
chromium_src-6f2e3919c4709404d8d7b6742f9cd9989b799c98.tar.bz2
Make PPAPI headers compile with C compilers (gcc on Linux & Mac and MSVS on Windows). This includes changing bool to PP_Bool and adding a PP_INLINE macro.
TEST=tests/test_c_includes.c BUG=59791,53451 The first patch set is a straight copy of http://codereview.chromium.org/4019010/show which got LGTMed when PPAPI was in its own repo, but had to be rolled back in order to include chrome changes. IMPORTANT: This change will break plugin implementations that use the C interface, and might break others as well. Review URL: http://codereview.chromium.org/4310002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65200 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins/pepper_cursor_control.cc')
-rw-r--r--webkit/glue/plugins/pepper_cursor_control.cc33
1 files changed, 17 insertions, 16 deletions
diff --git a/webkit/glue/plugins/pepper_cursor_control.cc b/webkit/glue/plugins/pepper_cursor_control.cc
index f515deb..62b4e2f 100644
--- a/webkit/glue/plugins/pepper_cursor_control.cc
+++ b/webkit/glue/plugins/pepper_cursor_control.cc
@@ -10,6 +10,7 @@
#include "ppapi/c/dev/ppb_cursor_control_dev.h"
#include "ppapi/c/pp_point.h"
#include "ppapi/c/pp_resource.h"
+#include "webkit/glue/plugins/pepper_common.h"
#include "webkit/glue/plugins/pepper_image_data.h"
#include "webkit/glue/plugins/pepper_plugin_instance.h"
#include "webkit/glue/plugins/pepper_resource.h"
@@ -18,59 +19,59 @@ namespace pepper {
namespace {
-bool SetCursor(PP_Instance instance_id,
+PP_Bool SetCursor(PP_Instance instance_id,
PP_CursorType_Dev type,
PP_Resource custom_image_id,
const PP_Point* hot_spot) {
PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id);
if (!instance)
- return false;
+ return PP_FALSE;
scoped_refptr<ImageData> custom_image(
Resource::GetAs<ImageData>(custom_image_id));
if (custom_image.get()) {
// TODO(neb): implement custom cursors.
NOTIMPLEMENTED();
- return false;
+ return PP_FALSE;
}
- return instance->SetCursor(type);
+ return BoolToPPBool(instance->SetCursor(type));
}
-bool LockCursor(PP_Instance instance_id) {
+PP_Bool LockCursor(PP_Instance instance_id) {
PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id);
if (!instance)
- return false;
+ return PP_FALSE;
// TODO(neb): implement cursor locking.
- return false;
+ return PP_FALSE;
}
-bool UnlockCursor(PP_Instance instance_id) {
+PP_Bool UnlockCursor(PP_Instance instance_id) {
PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id);
if (!instance)
- return false;
+ return PP_FALSE;
// TODO(neb): implement cursor locking.
- return false;
+ return PP_FALSE;
}
-bool HasCursorLock(PP_Instance instance_id) {
+PP_Bool HasCursorLock(PP_Instance instance_id) {
PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id);
if (!instance)
- return false;
+ return PP_FALSE;
// TODO(neb): implement cursor locking.
- return false;
+ return PP_FALSE;
}
-bool CanLockCursor(PP_Instance instance_id) {
+PP_Bool CanLockCursor(PP_Instance instance_id) {
PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id);
if (!instance)
- return false;
+ return PP_FALSE;
// TODO(neb): implement cursor locking.
- return false;
+ return PP_FALSE;
}
const PPB_CursorControl_Dev cursor_control_interface = {