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

Unified Diff: ppapi/cpp/dev/find_dev.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 | « ppapi/cpp/dev/file_ref_dev.cc ('k') | ppapi/cpp/dev/font_dev.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/dev/find_dev.cc
===================================================================
--- ppapi/cpp/dev/find_dev.cc (revision 65116)
+++ ppapi/cpp/dev/find_dev.cc (working copy)
@@ -5,6 +5,7 @@
#include "ppapi/cpp/dev/find_dev.h"
#include "ppapi/c/dev/ppb_find_dev.h"
+#include "ppapi/cpp/common.h"
#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/module_impl.h"
@@ -15,21 +16,23 @@
static const char kPPPFindInterface[] = PPP_FIND_DEV_INTERFACE;
-bool StartFind(PP_Instance instance,
- const char* text,
- bool case_sensitive) {
+PP_Bool StartFind(PP_Instance instance,
+ const char* text,
+ PP_Bool case_sensitive) {
void* object =
pp::Instance::GetPerInstanceObject(instance, kPPPFindInterface);
if (!object)
- return false;
- return static_cast<Find_Dev*>(object)->StartFind(text, case_sensitive);
+ return PP_FALSE;
+ bool return_value = static_cast<Find_Dev*>(object)->StartFind(
+ text, PPBoolToBool(case_sensitive));
+ return BoolToPPBool(return_value);
}
-void SelectFindResult(PP_Instance instance, bool forward) {
+void SelectFindResult(PP_Instance instance, PP_Bool forward) {
void* object =
pp::Instance::GetPerInstanceObject(instance, kPPPFindInterface);
if (object)
- static_cast<Find_Dev*>(object)->SelectFindResult(forward);
+ static_cast<Find_Dev*>(object)->SelectFindResult(PPBoolToBool(forward));
}
void StopFind(PP_Instance instance) {
@@ -61,7 +64,8 @@
void Find_Dev::NumberOfFindResultsChanged(int32_t total, bool final_result) {
if (ppb_find_f) {
ppb_find_f->NumberOfFindResultsChanged(associated_instance_->pp_instance(),
- total, final_result);
+ total,
+ BoolToPPBool(final_result));
}
}
« no previous file with comments | « ppapi/cpp/dev/file_ref_dev.cc ('k') | ppapi/cpp/dev/font_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698