summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp/dev/selection_dev.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 /ppapi/cpp/dev/selection_dev.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 'ppapi/cpp/dev/selection_dev.cc')
-rw-r--r--ppapi/cpp/dev/selection_dev.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/ppapi/cpp/dev/selection_dev.cc b/ppapi/cpp/dev/selection_dev.cc
index 6f1fcb7..f5c8cad 100644
--- a/ppapi/cpp/dev/selection_dev.cc
+++ b/ppapi/cpp/dev/selection_dev.cc
@@ -4,6 +4,7 @@
#include "ppapi/cpp/dev/selection_dev.h"
+#include "ppapi/cpp/common.h"
#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/var.h"
@@ -14,12 +15,13 @@ namespace {
static const char kPPPSelectionInterface[] = PPP_SELECTION_DEV_INTERFACE;
-PP_Var GetSelectedText(PP_Instance instance, bool html) {
+PP_Var GetSelectedText(PP_Instance instance, PP_Bool html) {
void* object =
pp::Instance::GetPerInstanceObject(instance, kPPPSelectionInterface);
if (!object)
return Var().Detach();
- return static_cast<Selection_Dev*>(object)->GetSelectedText(html).Detach();
+ return static_cast<Selection_Dev*>(object)->
+ GetSelectedText(PPBoolToBool(html)).Detach();
}
const PPP_Selection_Dev ppp_selection = {